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 edu.samplu.common.Failable;
19  import edu.samplu.common.ITUtil;
20  import edu.samplu.common.WebDriverLegacyITBase;
21  
22  /**
23   * @author Kuali Rice Team (rice.collab@kuali.org)
24   */
25  public abstract class Help2AbstractSmokeTestBase extends WebDriverLegacyITBase {
26  
27      /**
28       * /kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView-Help&methodToCall=start
29       */
30      public static final String BOOKMARK_URL = "/kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView-Help&methodToCall=start";
31     
32      /**
33       * Nav tests start at {@link edu.samplu.common.ITUtil#PORTAL}.  Bookmark Tests should override and return {@link Help2AbstractSmokeTestBase#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 testHelp2Nav(Failable failable) throws Exception {
52          navigation();
53          testViewHelp2();
54          navigation();
55          testExternalHelp2();
56          navigation();
57          testDisplayOnlyExternalHelp2();
58          navigation();
59          testMissingExternalHelp2();
60          passed();
61      }
62  
63      protected void testHelp2Bookmark(Failable failable) throws Exception {
64          testViewHelp();
65          testPageHelp();
66          testTooltipHelp();
67          testDisplayOnlyTooltipHelp();
68          testMissingTooltipHelp();
69          passed();
70      }
71  }