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