1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package edu.sampleu.kew;
17  
18  import org.junit.Test;
19  import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
20  import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21  import org.kuali.rice.testtools.selenium.WebDriverUtils;
22  
23  
24  
25  
26  
27  
28  public class RoutingReportAft extends WebDriverLegacyITBase {
29  
30      
31  
32  
33  
34  
35      public static final String BOOKMARK_URL =
36              AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Routing%20Report&channelUrl=" + WebDriverUtils
37                      .getBaseUrlString() + "/kew/RoutingReport.do?returnLocation=" + AutomatedFunctionalTestUtils.PORTAL;
38  
39      @Override
40      protected String getBookmarkUrl() {
41          return BOOKMARK_URL;
42      }
43  
44      @Override
45      protected void navigate() throws InterruptedException {
46          waitAndClickMainMenu();
47          waitAndClickByLinkText("Routing Report");
48      }
49  
50      protected void testRoutingReport() throws Exception {
51          selectFrameIframePortlet();
52          selectOptionByName("ruleTemplateId", "1015"); 
53          assertTextPresent(new String[] {"Enter Routing Data", "Effective Date:", "Document Type:"});
54          assertElementPresentByXpath("//input[@name='methodToCall.calculateRoute']");
55  
56          selectOptionByName("ruleTemplateId", "1026"); 
57          waitForTextPresent("Destination:");
58      }
59  
60      @Test
61      public void testRoutingReportBookmark() throws Exception {
62          testRoutingReport();
63          passed();
64      }
65  
66      @Test
67      public void testRoutingReportNav() throws Exception {
68          testRoutingReport();
69          passed();
70      }
71  }