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