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 LabsDefaultRuleEventAndBusinessRuleAft extends WebDriverLegacyITBase {
27
28
29
30
31 public static final String BOOKMARK_URL = "/kr-krad/defaultRuleEvent?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("Default Rule Event and Business Rule");
41 }
42
43 protected void testDefaultRuleEventAndBusinessRule() 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 waitAndClickSubmitByText();
53 waitAndClickConfirmSubmitOk();
54 failOnErrorMessageItem();
55 waitForTextPresent("Document was successfully submitted.", WebDriverUtils.configuredImplicityWait() * 2);
56 }
57
58 @Test
59 public void testDefaultRuleEventAndBusinessRuleBookmark() throws Exception {
60 testDefaultRuleEventAndBusinessRule();
61 passed();
62 }
63
64 @Test
65 public void testDefaultRuleEventAndBusinessRuleNav() throws Exception {
66 testDefaultRuleEventAndBusinessRule();
67 passed();
68 }
69
70 @Test
71 public void testDemoCustomRuleEventAndDocumentEventMethodInvocationAccountTypeCheckBookmark() throws Exception {
72 testDemoCustomRuleEventAndDocumentEventMethodInvocationAccountTypeChec();
73 passed();
74 }
75
76 @Test
77 public void testDemoCustomRuleEventAndDocumentEventMethodInvocationAccountTypeChecNav() throws Exception {
78 testDemoCustomRuleEventAndDocumentEventMethodInvocationAccountTypeChec();
79 passed();
80 }
81 }