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