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 org.junit.Test; 019import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils; 020import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase; 021import org.kuali.rice.testtools.selenium.WebDriverUtils; 022 023/** 024 * Tests the Component section in Rice. 025 * 026 * @author Kuali Rice Team (rice.collab@kuali.org) 027 */ 028public class RoutingReportAft extends WebDriverLegacyITBase { 029 030 /** 031 * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Routing%20Report&channelUrl=" 032 * + WebDriverUtils.getBaseUrlString() + "/kew/RoutingReport.do?returnLocation=" + 033 * AutomatedFunctionalTestUtils.PORTAL; 034 */ 035 public static final String BOOKMARK_URL = 036 AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Routing%20Report&channelUrl=" + WebDriverUtils 037 .getBaseUrlString() + "/kew/RoutingReport.do?returnLocation=" + AutomatedFunctionalTestUtils.PORTAL; 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("Routing Report"); 048 } 049 050 protected void testRoutingReport() throws Exception { 051 selectFrameIframePortlet(); 052 selectOptionByName("ruleTemplateId", "1015"); // WorkflowDocumentDelegationTemplate 053 assertTextPresent(new String[] {"Enter Routing Data", "Effective Date:", "Document Type:"}); 054 assertElementPresentByXpath("//input[@name='methodToCall.calculateRoute']"); 055 056 selectOptionByName("ruleTemplateId", "1026"); // TravelRequest-DestinationRouting 057 waitForTextPresent("Destination:"); 058 } 059 060 @Test 061 public void testRoutingReportBookmark() throws Exception { 062 testRoutingReport(); 063 passed(); 064 } 065 066 @Test 067 public void testRoutingReportNav() throws Exception { 068 testRoutingReport(); 069 passed(); 070 } 071}