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.samplu.krad.configview;
17  
18  import org.kuali.rice.testtools.selenium.Failable;
19  import org.kuali.rice.testtools.selenium.ITUtil;
20  import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21  
22  /**
23   * @author Kuali Rice Team (rice.collab@kuali.org)
24   */
25  public abstract class HelpAbstractSmokeTestBase extends WebDriverLegacyITBase {
26  
27      /**
28       * /kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView&methodToCall=start&pageId=ConfigurationTestView-Help-Page
29       */
30      public static final String BOOKMARK_URL = "/kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView&methodToCall=start&pageId=ConfigurationTestView-Help-Page";
31     
32      /**
33       * Nav tests start at {@link org.kuali.rice.testtools.selenium.ITUtil#PORTAL}.  Bookmark Tests should override and return {@link HelpAbstractSmokeTestBase#BOOKMARK_URL}
34       * {@inheritDoc}
35       * @return
36       */
37      @Override
38      public String getTestUrl() {
39          return ITUtil.PORTAL;
40      }
41  
42      protected void navigation() throws Exception {
43          waitAndClickKRAD();
44          waitAndClickByXpath(CONFIGURATION_VIEW_XPATH);
45          switchToWindow(CONFIGURATION_VIEW_WINDOW_TITLE);
46          waitAndClickByLinkText("Help");
47          Thread.sleep(5000);
48          selectFrameIframePortlet();
49      }
50  
51      protected void testHelpNav(Failable failable) throws Exception {
52          navigation();
53          testViewHelp();
54          navigation();
55          testPageHelp();
56          navigation();
57          testTooltipHelp();
58          navigation();
59          testDisplayOnlyTooltipHelp();
60          navigation();
61          testMissingTooltipHelp();
62          passed();
63      }
64  
65      protected void testHelpBookmark(Failable failable) throws Exception {
66          testViewHelp();
67          testPageHelp();
68          testTooltipHelp();
69          testDisplayOnlyTooltipHelp();
70          testMissingTooltipHelp();
71          passed();
72      }
73  }