001 /**
002 * Copyright 2005-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package edu.samplu.krad.configview;
017
018 import edu.samplu.common.WebDriverLegacyITBase;
019
020 import org.junit.Test;
021
022 /**
023 * Test the help widget
024 *
025 * <p>
026 * Selenium RC does not allow us to test the external help popup windows due to an error on JavaScrips window.close
027 * method when selenium is running. To test the external help we use the {@link HelpWDIT2} test
028 * which utilizes WebDriver. Unfortunately due to a WebDriver bug/feature we can't test the tooltip help there.
029 * </p>
030 *
031 * @author Kuali Rice Team (rice.collab@kuali.org)
032 */
033 public class HelpWDIT extends WebDriverLegacyITBase {
034
035 // Delay in milliseconds used to allow the help window reload the new help page.
036 // waitForPopUp will not work since the window already exists.
037 // private long HELP_WINDOW_LOAD_DELAY = 3000;
038
039 @Override
040 public String getTestUrl() {
041 return "/kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView&methodToCall=start&pageId=ConfigurationTestView-Help-Page";
042 }
043
044
045 /**
046 * Test the tooltip and external help on the view
047 */
048 @Test
049 public void testViewHelp() throws Exception {
050 selectFrameIframePortlet();
051 super.testViewHelp();
052 passed();
053 }
054
055 /**
056 * Test the tooltip and external help on the page
057 */
058 @Test
059 public void testPageHelp() throws Exception {
060 selectFrameIframePortlet();
061 super.testPageHelp();
062 passed();
063 }
064
065 /**
066 * Test the tooltip help on the section and fields
067 */
068 @Test
069 public void testTooltipHelp() throws Exception {
070 selectFrameIframePortlet();
071 super.testTooltipHelp();
072 passed();
073 }
074
075 /**
076 * Test the tooltip help on the sub-section and fields that are display only
077 */
078 @Test
079 public void testDisplayOnlyTooltipHelp() throws Exception {
080 selectFrameIframePortlet();
081 super.testDisplayOnlyTooltipHelp();
082 passed();
083 }
084
085 /**
086 * Test the tooltip help on the section and fields with no content
087 */
088 @Test
089 public void testMissingTooltipHelp() throws Exception {
090 selectFrameIframePortlet();
091 super.testMissingTooltipHelp();
092 passed();
093 }
094 }