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.common; 017 018 import org.junit.Test; 019 020 /** 021 * @deprecated use WebDriverITBase 022 * @author Kuali Rice Team (rice.collab@kuali.org) 023 */ 024 public abstract class MainMenuLookupITBase extends MenuITBase { 025 @Override 026 protected String getCreateNewLinkLocator() { 027 return "link=Create New"; 028 } 029 030 @Override 031 protected String getMenuLinkLocator() { 032 return "link=Main Menu"; 033 } 034 035 /** 036 * Override to execute assertions once a looked-up item's edit action is clicked. 037 */ 038 public abstract void lookupAssertions(); 039 040 @Test 041 public void testLookUp() throws Exception { 042 waitAndClick(getLinkLocator()); 043 waitForPageToLoad(); 044 selectFrame("iframeportlet"); 045 waitAndClick("//button[contains(.,'earch')]"); 046 waitAndClick("link=edit"); 047 checkForIncidentReport("submit"); 048 assertTextPresent("ubmit"); 049 assertTextPresent("ave"); 050 assertTextPresent("pprove"); 051 assertTextPresent("lose"); 052 assertTextPresent("ancel"); 053 lookupAssertions(); 054 waitAndClick("//a[contains(., 'ancel')]"); 055 } 056 }