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.WebDriverLegacyITBase;
19  
20  import org.junit.Test;
21  
22  /**
23   * Test the help widget
24   *
25   * <p>
26   * Selenium RC does not allow us to test the external help popup windows due to an error on JavaScrips window.close
27   * method when selenium is running.  To test the external help we use the {@link HelpWDIT2} test
28   * which utilizes WebDriver.  Unfortunately due to a WebDriver bug/feature we can't test the tooltip help there.
29   * </p>
30   *
31   * @author Kuali Rice Team (rice.collab@kuali.org)
32   */
33  public class HelpWDIT extends WebDriverLegacyITBase {
34  
35      // Delay in milliseconds used to allow the help window reload the new help page.
36      // waitForPopUp will not work since the window already exists.
37  //    private long HELP_WINDOW_LOAD_DELAY = 3000;
38  
39      @Override
40      public String getTestUrl() {
41          return "/kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView&methodToCall=start&pageId=ConfigurationTestView-Help-Page";
42      }
43  
44  
45      /**
46       * Test the tooltip and external help on the view
47       */
48      @Test
49      public void testViewHelp() throws Exception {
50          selectFrameIframePortlet();
51          super.testViewHelp();
52          passed();
53      }
54  
55      /**
56       * Test the tooltip and external help on the page
57       */
58      @Test
59      public void testPageHelp() throws Exception {
60          selectFrameIframePortlet();
61          super.testPageHelp();
62          passed();
63      }
64  
65      /**
66       * Test the tooltip help on the section and fields
67       */
68      @Test
69      public void testTooltipHelp() throws Exception {
70          selectFrameIframePortlet();
71          super.testTooltipHelp();
72          passed();
73      }
74  
75      /**
76       * Test the tooltip help on the sub-section and fields that are display only
77       */
78      @Test
79      public void testDisplayOnlyTooltipHelp() throws Exception {
80          selectFrameIframePortlet();
81          super.testDisplayOnlyTooltipHelp();
82          passed();
83      }
84  
85      /**
86       * Test the tooltip help on the section and fields with no content
87       */
88      @Test
89      public void testMissingTooltipHelp() throws Exception {
90          selectFrameIframePortlet();
91          super.testMissingTooltipHelp();
92          passed();
93      }
94  }