001 /** 002 * Copyright 2005-2011 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.mainmenu.test; 017 018 import edu.samplu.common.ITUtil; 019 import edu.samplu.common.UpgradedSeleniumITBase; 020 import org.junit.Test; 021 022 import static org.junit.Assert.assertEquals; 023 024 /** 025 * tests creating and cancelling new and edit Routing Rule maintenance screens 026 * 027 * @author Kuali Rice Team (rice.collab@kuali.org) 028 */ 029 public class WorkFlowRouteRulesIT extends UpgradedSeleniumITBase { 030 @Override 031 public String getTestUrl() { 032 return ITUtil.PORTAL; 033 } 034 035 @Test 036 /** 037 * tests that a new Routing Rule maintenance document can be cancelled 038 */ 039 public void testCreateNew() throws Exception { 040 assertEquals("Kuali Portal Index", getTitle()); 041 waitAndClick("link=Routing Rules"); 042 waitForPageToLoad(); 043 assertEquals("Kuali Portal Index", getTitle()); 044 selectFrame("iframeportlet"); 045 waitAndClick("//img[@alt='create new']"); 046 // selectFrame("relative=up"); 047 waitAndClick("methodToCall.cancel", "https://jira.kuali.org/browse/KULRICE-8161 Work Flow Route Rules cancel new yields 404 not found"); 048 setSpeed("3000"); 049 // KULRICE-7753 : WorkFlowRouteRulesIT cancel confirmation missing from create new Route Rules. 050 waitAndClick("methodToCall.processAnswer.button0", "https://jira.kuali.org/browse/KULRICE-7753 : WorkFlowRouteRulesIT cancel confirmation missing from create new Route Rules."); 051 } 052 053 @Test 054 /** 055 * tests that a Routing Rule maintenance document is created for an edit operation originating from a lookup screen 056 */ 057 public void testEditRouteRules() throws Exception { 058 assertEquals("Kuali Portal Index", getTitle()); 059 waitAndClick("link=Routing Rules"); 060 waitForPageToLoad(); 061 assertEquals("Kuali Portal Index", getTitle()); 062 selectFrame("iframeportlet"); 063 waitAndClick("//input[@name='methodToCall.search' and @value='search']"); 064 waitAndClick("link=edit"); 065 waitAndClick("methodToCall.cancel"); 066 waitAndClick("methodToCall.processAnswer.button0"); 067 } 068 }