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 import org.openqa.selenium.By;
20
21 /**
22 * @deprecated use WebDriverITBase
23 * @author Kuali Rice Team (rice.collab@kuali.org)
24 */
25 public abstract class MainMenuLookupLegacyITBase extends MenuLegacyITBase {
26 @Override
27 protected String getCreateNewLinkLocator() {
28 return "Create New";
29 }
30
31 @Override
32 protected String getMenuLinkLocator() {
33 return "Main Menu";
34 }
35
36 /**
37 * Override to execute assertions once a looked-up item's edit action is clicked.
38 */
39 public abstract void lookupAssertions();
40
41 @Test
42 public void testLookUp() throws Exception {
43 waitAndClickByLinkText(getLinkLocator());
44 waitForPageToLoad();
45 selectFrame("iframeportlet");
46 // Mixed capitalization
47 waitAndClick(By.xpath("//button[contains(text(),'Search')]"));
48 waitAndClickByLinkText("edit", "edit button not pressent does user " + user + " have permission?");
49 checkForIncidentReport("submit");
50 assertTextPresent("ubmit");
51 assertTextPresent("ave");
52 assertTextPresent("pprove");
53 assertTextPresent("lose");
54 assertTextPresent("ancel");
55 lookupAssertions();
56 waitAndClick(By.xpath("//a[contains(text(), 'Cancel')]"));
57 passed();
58 }
59 }