1 /**
2 * Copyright 2005-2011 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package edu.samplu.common;
17
18 import org.junit.Test;
19
20 /**
21 * @deprecated use WebDriverITBase
22 * @author Kuali Rice Team (rice.collab@kuali.org)
23 */
24 public abstract class MainMenuLookupITBase extends MenuITBase {
25 @Override
26 protected String getCreateNewLinkLocator() {
27 return "link=Create New";
28 }
29
30 @Override
31 protected String getMenuLinkLocator() {
32 return "link=Main Menu";
33 }
34
35 /**
36 * Override to execute assertions once a looked-up item's edit action is clicked.
37 */
38 public abstract void lookupAssertions();
39
40 @Test
41 public void testLookUp() throws Exception {
42 waitAndClick(getLinkLocator());
43 waitForPageToLoad();
44 selectFrame("iframeportlet");
45 waitAndClick("//button[contains(.,'earch')]");
46 waitAndClick("link=edit");
47 checkForIncidentReport("submit");
48 assertTextPresent("ubmit");
49 assertTextPresent("ave");
50 assertTextPresent("pprove");
51 assertTextPresent("lose");
52 assertTextPresent("ancel");
53 lookupAssertions();
54 waitAndClick("//a[contains(., 'ancel')]");
55 }
56 }