View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public class XmlStylesheetsAft extends WebDriverLegacyITBase {
27  
28      /**
29       * AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=XML%20Stylesheets&channelUrl="+ WebDriverUtils
30       *  .getBaseUrlString()+"/kr/lookup.do?businessObjectClassName=org.kuali.rice.coreservice.impl.style.StyleBo&docFormKey=88888888&returnLocation="
31       *  + AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
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  }