001/** 002 * Copyright 2005-2014 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 */ 016package edu.sampleu.kew; 017 018import edu.sampleu.admin.ConfigComponentActionListBkMrkAft; 019import org.junit.Test; 020import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils; 021import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase; 022import org.kuali.rice.testtools.selenium.WebDriverUtils; 023 024/** 025 * Tests the Component section in Rice. 026 * 027 * @author Kuali Rice Team (rice.collab@kuali.org) 028 */ 029public class QuickLinksAft extends WebDriverLegacyITBase { 030 031 /** 032 * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Quicklinks&channelUrl=" 033 * + WebDriverUtils.getBaseUrlString() + "/kew/QuickLinks.do"; 034 */ 035 public static final String BOOKMARK_URL = 036 AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Quicklinks&channelUrl=" + WebDriverUtils 037 .getBaseUrlString() + "/kew/QuickLinks.do"; 038 039 @Override 040 protected String getBookmarkUrl() { 041 return BOOKMARK_URL; 042 } 043 044 @Override 045 protected void navigate() throws InterruptedException { 046 waitAndClickMainMenu(); 047 waitAndClickByLinkText("Quicklinks"); 048 } 049 050 protected void testQuickLinks() throws Exception { 051 selectFrameIframePortlet(); 052 assertTextPresent(new String[] {"Named Searches", "Quick EDoc Search", "Quick EDoc Watch", "Quick Action List"}); 053 054 String rootWindow = driver.getWindowHandle(); 055 056 ConfigComponentActionListBkMrkAft test = new ConfigComponentActionListBkMrkAft(); 057 test.setTestMethodName("QuickLinksAft." + testMethodName); 058 test.setUpSetUp(); 059 test.setDriver(getDriver()); // Use this tests WebDriver as the tests own has not been setup 060 open(getBaseUrlString() + test.getBookmarkUrl()); 061 test.testActionListAcknowledgePerson_WithPendingApprove(); 062 close(); // action list window 063 driver.switchTo().window(rootWindow); 064 logout(); // as fran 065 066 open(getBaseUrlString() + getBookmarkUrl()); 067 selectFrameIframePortlet(); 068 assertTextPresent(new String[] {"ENROUTE", "Route Log"}); 069 } 070 071 @Test 072 public void testQuickLinksBookmark() throws Exception { 073 testQuickLinks(); 074 passed(); 075 } 076 077 @Test 078 public void testQuickLinksNav() throws Exception { 079 testQuickLinks(); 080 passed(); 081 } 082}