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