1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.mainmenu.test;
17
18 import static org.junit.Assert.assertEquals;
19 import static org.junit.Assert.assertTrue;
20
21 import edu.samplu.common.ITUtil;
22 import edu.samplu.common.UpgradedSeleniumITBase;
23 import org.junit.Test;
24
25
26
27
28
29
30 public class WorkFlowRouteRulesDelegationIT extends UpgradedSeleniumITBase {
31 @Override
32 public String getTestUrl() {
33 return ITUtil.PORTAL;
34 }
35
36 @Test
37
38
39
40 public void testCreateNew() throws Exception {
41 assertEquals("Kuali Portal Index", getTitle());
42 waitAndClick("link=Routing Rules Delegation");
43 waitForPageToLoad();
44 assertEquals("Kuali Portal Index", getTitle());
45 selectFrame("iframeportlet");
46 waitAndClick("//img[@alt='create new']");
47
48 waitForPageToLoad();
49 waitAndClick("name=methodToCall.performLookup.(!!org.kuali.rice.kew.rule.RuleBaseValues!!).(((id:parentRuleId))).((``)).((<>)).(([])).((**)).((^^)).((&&)).((//)).((~~)).(::::;;::::).anchor");
50 waitForPageToLoad();
51 waitAndClick("css=td.infoline > input[name=\"methodToCall.search\"]");
52 waitForPageToLoad();
53 waitAndClick("css=a[title=\"return valueRule Id=1046 \"]");
54 waitForPageToLoad();
55 waitAndClick("name=parentResponsibilityId");
56 waitAndClick("name=methodToCall.createDelegateRule");
57 waitForPageToLoad();
58 assertTrue(isElementPresent("methodToCall.cancel"));
59 waitAndClick("methodToCall.cancel");
60 waitForPageToLoad();
61 waitAndClick("methodToCall.processAnswer.button0");
62 waitForPageToLoad();
63 }
64
65
66
67
68
69 public void testEditRouteRulesDelegation() throws Exception {
70 assertEquals("Kuali Portal Index", getTitle());
71 waitAndClick("link=Routing Rules Delegation");
72 waitForPageToLoad();
73 assertEquals("Kuali Portal Index", getTitle());
74 selectFrame("iframeportlet");
75 setSpeed("2000");
76 waitAndClick("//input[@name='methodToCall.search' and @value='search']");
77 waitForPageToLoad();
78 waitAndClick("link=edit");
79 waitForPageToLoad();
80 assertTrue(isElementPresent("methodToCall.cancel"));
81 waitAndClick("methodToCall.cancel");
82 waitForPageToLoad();
83 waitAndClick("methodToCall.processAnswer.button0");
84 waitForPageToLoad();
85
86 }
87
88 @Test
89 public void testCreateNewRRDTravelRequestDestRouting() throws Exception {
90 waitAndClick("link=Routing Rules Delegation");
91 waitForPageToLoad();
92 selectFrame("iframeportlet");
93 waitAndClick("css=img[alt=\"create new\"]");
94 waitForPageToLoad();
95 waitAndClick("name=methodToCall.performLookup.(!!org.kuali.rice.kew.rule.RuleBaseValues!!).(((id:parentRuleId))).((``)).((<>)).(([])).((**)).((^^)).((&&)).((//)).((~~)).(::::;;::::).anchor");
96 waitForPageToLoad();
97 waitAndClick("css=td.infoline > input[name=\"methodToCall.search\"]");
98 waitForPageToLoad();
99 waitAndClick("css=a[title=\"return valueRule Id=1046 \"]");
100 waitForPageToLoad();
101 waitAndClick("name=parentResponsibilityId");
102 waitAndClick("name=methodToCall.createDelegateRule");
103 waitForPageToLoad();
104 waitAndClick("name=methodToCall.cancel");
105 waitForPageToLoad();
106 waitAndClick("name=methodToCall.processAnswer.button0");
107 waitForPageToLoad();
108 selectWindow("null");
109 waitAndClick("xpath=(//input[@name='imageField'])[2]");
110 waitForPageToLoad();
111 }
112 }