View Javadoc

1   /**
2    * Copyright 2005-2013 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.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   * Tests the Component section in Rice.
25   *
26   * @author Kuali Rice Team (rice.collab@kuali.org)
27   */
28  public class QuickLinksAft extends WebDriverLegacyITBase {
29  
30      /**
31       * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Quicklinks&channelUrl="
32       * + WebDriverUtils.getBaseUrlString() + "/kew/QuickLinks.do";
33       */
34      public static final String BOOKMARK_URL =
35              AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Quicklinks&channelUrl=" + WebDriverUtils
36                      .getBaseUrlString() + "/kew/QuickLinks.do";
37  
38      @Override
39      protected String getBookmarkUrl() {
40          return BOOKMARK_URL;
41      }
42  
43      @Override
44      protected void navigate() throws InterruptedException {
45          waitAndClickMainMenu();
46          waitAndClickByLinkText("Quicklinks");
47      }
48  
49      protected void testQuickLinks() throws Exception {
50          selectFrameIframePortlet();
51          assertTextPresent("Quick EDoc Search");
52          assertTextPresent("Created=");
53          assertTextPresent("Quick Action List");
54          assertTextPresent("ENROUTE");
55          assertElementPresentByXpath("//a[@href='RouteLog.do?documentId=3017']");
56      }
57  
58      @Test
59      public void testQuickLinksBookmark() throws Exception {
60          testQuickLinks();
61          passed();
62      }
63  
64      @Test
65      public void testQuickLinksNav() throws Exception {
66          testQuickLinks();
67          passed();
68      }
69  }