1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package edu.sampleu.admin.workflow;
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  public class XmlStylesheetsAft extends WebDriverLegacyITBase {
27  
28      
29  
30  
31  
32  
33      public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=XML%20Stylesheets&channelUrl="+ WebDriverUtils
34              .getBaseUrlString()+"/kr/lookup.do?businessObjectClassName=org.kuali.rice.coreservice.impl.style.StyleBo&docFormKey=88888888&returnLocation="
35              + AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
36     
37      @Override
38      protected String getBookmarkUrl() {
39          return BOOKMARK_URL;
40      }
41  
42      @Override
43      protected void navigate() throws InterruptedException {
44          waitAndClickAdministration();
45          waitAndClickByLinkText("XML Stylesheets");
46      }
47  
48      protected void testXmlStylesheet() throws Exception {
49          selectFrameIframePortlet();
50          waitAndClickSearch();
51          Thread.sleep(2000);
52          assertTextPresent("eDoc.Example1.Style");
53          assertTextPresent("2009");
54          assertTextPresent("No");
55          waitAndClickByXpath("//input[@name='active' and @value='Y']");
56          waitAndClickSearch();
57          Thread.sleep(2000);
58          assertTextPresent("2020");
59          assertTextPresent("2021");
60          if(isTextPresent("2009"))  {
61              jiraAwareFail("Filter not working ! " + this.getClass().toString() );
62          }
63      }
64  
65      @Test
66      public void testXmlStylesheetBookmark() throws Exception {
67          testXmlStylesheet();
68          passed();
69      }
70  
71      @Test
72      public void testXmlStylesheetNav() throws Exception {
73          testXmlStylesheet();
74          passed();
75      }
76  }