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.sampleu.krad.configview;
017    
018    import org.kuali.rice.testtools.common.JiraAwareFailable;
019    import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
020    
021    /**
022     * @author Kuali Rice Team (rice.collab@kuali.org)
023     */
024    public abstract class HelpAftBase extends WebDriverLegacyITBase {
025    
026        /**
027         * /kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView&methodToCall=start&pageId=ConfigurationTestView-Help-Page
028         */
029        public static final String BOOKMARK_URL = "/kr-krad/configuration-test-view-uif-controller?viewId=ConfigurationTestView&methodToCall=start&pageId=ConfigurationTestView-Help-Page";
030       
031        @Override
032        protected String getBookmarkUrl() {
033            return BOOKMARK_URL;
034        }
035    
036        protected void navigation() throws Exception {
037            waitAndClickKRAD();
038            waitAndClickByXpath(CONFIGURATION_VIEW_XPATH);
039            switchToWindow(CONFIGURATION_VIEW_WINDOW_TITLE);
040            waitAndClickByLinkText("Help");
041            Thread.sleep(5000);
042            selectFrameIframePortlet();
043        }
044    
045        protected void testHelpNav(JiraAwareFailable failable) throws Exception {
046            navigation();
047            testViewHelp();
048            navigation();
049            testPageHelp();
050            navigation();
051            testTooltipHelp();
052            navigation();
053            testDisplayOnlyTooltipHelp();
054            navigation();
055            testMissingTooltipHelp();
056            passed();
057        }
058    
059        protected void testHelpBookmark(JiraAwareFailable failable) throws Exception {
060            testViewHelp();
061            testPageHelp();
062            testTooltipHelp();
063            testDisplayOnlyTooltipHelp();
064            testMissingTooltipHelp();
065            passed();
066        }
067    }