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 WorkFlowRouteRulesIT 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");
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 assertTrue(selenium.isElementPresent("methodToCall.cancel"));
49 selenium.click("methodToCall.cancel");
50 selenium.waitForPageToLoad("30000");
51 selenium.setSpeed("3000");
52 selenium.click("methodToCall.processAnswer.button0");
53 selenium.waitForPageToLoad("30000");
54 }
55
56 @Test
57
58
59
60 public void testEditRouteRules() throws Exception {
61 assertEquals("Kuali Portal Index", selenium.getTitle());
62 selenium.click("link=Routing Rules");
63 selenium.waitForPageToLoad("30000");
64 assertEquals("Kuali Portal Index", selenium.getTitle());
65 selenium.selectFrame("iframeportlet");
66 selenium.click("//input[@name='methodToCall.search' and @value='search']");
67 selenium.waitForPageToLoad("30000");
68 selenium.click("link=edit");
69 selenium.waitForPageToLoad("30000");
70 assertTrue(selenium.isElementPresent("methodToCall.cancel"));
71 selenium.click("methodToCall.cancel");
72 selenium.waitForPageToLoad("30000");
73 selenium.click("methodToCall.processAnswer.button0");
74 selenium.waitForPageToLoad("30000");
75
76 }
77 }