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