001    /*
002     * Copyright 2006-2012 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    
017    package edu.samplu.krad.configview;
018    
019    import edu.samplu.common.WebDriverITBase;
020    import edu.samplu.common.WebDriverLegacyITBase;
021    
022    import org.junit.Test;
023    import org.openqa.selenium.By;
024    import org.openqa.selenium.interactions.Actions;
025    
026    import static org.junit.Assert.assertEquals;
027    import static org.junit.Assert.assertFalse;
028    import static org.junit.Assert.assertTrue;
029    
030    /**
031     * Test the help widget
032     * 
033     * @author Kuali Rice Team (rice.collab@kuali.org)
034     */
035    public class HelpWDIT2 extends WebDriverLegacyITBase {
036    
037        /**
038         * URL for the Configuration Test View - Help
039         * 
040         * <p>
041         * Due to a WebDriver bug (feature?) the tooltips can not be tested with WebDriver.
042         * {@link HelpWDIT} is being used to test help tooltips.
043         * </p>
044         * 
045         * @see edu.samplu.common.WebDriverITBase#getTestUrl()
046         */
047        @Override
048        public String getTestUrl() {
049            return "/kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView-Help&methodToCall=start";
050        }
051    
052        /**
053         * Test the tooltip and external help on the view
054         */
055        @Test
056        public void testViewHelp2() throws Exception {
057            selectFrame("iframeportlet");
058            super.testViewHelp2();
059        }
060    
061        /**
062         * Test the external help on the section and fields
063         */
064        @Test
065        public void testExternalHelp2() throws Exception {
066            selectFrame("iframeportlet");
067            super.testExternalHelp2();
068        }
069    
070        /**
071         * Test the external help on the sub-section and display only fields
072         */
073        @Test
074        public void testDisplayOnlyExternalHelp2() throws Exception {
075            selectFrame("iframeportlet");
076            super.testDisplayOnlyExternalHelp2();
077        }
078    
079        /**
080         * Test the external help on the section and fields with missing help URL
081         */
082        @Test
083        public void testMissingExternalHelp2() throws Exception {
084            selectFrame("iframeportlet");
085            super.testMissingExternalHelp2();
086        }
087    }