1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.labs;
17
18 import org.apache.commons.lang3.RandomStringUtils;
19 import org.junit.Test;
20 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21 import org.kuali.rice.testtools.selenium.WebDriverUtils;
22
23
24
25
26 public class LabsCustomRuleEventAndDocumentEventMethodInvocationAft extends WebDriverLegacyITBase {
27
28
29
30
31 public static final String BOOKMARK_URL = "/kr-krad/ruleEvent?methodToCall=start&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount";
32
33 @Override
34 protected String getBookmarkUrl() {
35 return BOOKMARK_URL;
36 }
37
38 @Override
39 protected void navigate() throws Exception {
40 waitAndClickByLinkText("Custom Rule Event and Document Event Method Invocation");
41 }
42
43 protected void testDemoCustomRuleEventAndDocumentEventMethodInvocation() throws InterruptedException {
44 waitAndTypeByName("document.documentHeader.documentDescription","Travel Account Maintenance New Test Document");
45 String randomCode = RandomStringUtils.randomAlphabetic(9).toUpperCase();
46 waitAndTypeByName("document.newMaintainableObject.dataObject.number",randomCode);
47 waitAndTypeByName("document.newMaintainableObject.dataObject.name","Test Account Name");
48 waitAndClickByName("document.newMaintainableObject.dataObject.accountTypeCode");
49
50 saveSuccessfully();
51
52
53 waitAndClickSubmitByText();
54 waitAndClickConfirmSubmitOk();
55 failOnErrorMessageItem();
56 waitForTextPresent("Document was successfully submitted.", WebDriverUtils.configuredImplicityWait() * 2);
57 }
58
59 @Test
60 public void testDemoCustomRuleEventAndDocumentEventMethodInvocationBookmark() throws Exception {
61 testDemoCustomRuleEventAndDocumentEventMethodInvocation();
62 passed();
63 }
64
65 @Test
66 public void testDemoCustomRuleEventAndDocumentEventMethodInvocationNav() throws Exception {
67 testDemoCustomRuleEventAndDocumentEventMethodInvocation();
68 passed();
69 }
70
71 @Test
72 public void testDemoCustomRuleEventAndDocumentEventMethodInvocationAccountTypeCheckBookmark() throws Exception {
73 testDemoCustomRuleEventAndDocumentEventMethodInvocationAccountTypeChec();
74 passed();
75 }
76
77 @Test
78 public void testDemoCustomRuleEventAndDocumentEventMethodInvocationAccountTypeChecNav() throws Exception {
79 testDemoCustomRuleEventAndDocumentEventMethodInvocationAccountTypeChec();
80 passed();
81 }
82 }