1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.labs;
17
18 import org.junit.Test;
19 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
20 import org.openqa.selenium.By;
21
22
23
24
25 public class LabsTravelCompanyLookUpDisableNewAndCopyAft extends WebDriverLegacyITBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=KradMaintenanceSample-PageR1C2";
31
32 @Override
33 protected String getBookmarkUrl() {
34 return BOOKMARK_URL;
35 }
36
37 @Override
38 protected void navigate() throws Exception {
39 waitAndClickByLinkText("Maintenance");
40 waitAndClickByLinkText("Maintenance Sample - Disable New and Copy");
41 }
42
43 protected void testTravelCompanyLookUpDisableNewAndCopy() throws InterruptedException {
44 waitAndClickByLinkText("Travel Company Maintenance Sample - Disable New and Copy");
45 waitAndTypeByName("lookupCriteria[travelCompanyId]","10000");
46 waitAndClickSearchByText();
47 waitForElementPresentByXpath("//a[contains(text(),'10000')]");
48 waitAndClickButtonByText("Clear Values");
49 waitAndTypeByName("lookupCriteria[travelCompanyName]","AAA Travel");
50 waitAndClickByXpath("//input[@name='lookupCriteria[active]' and @value='N']");
51 waitAndClickSearchByText();
52 waitForElementPresentByXpath("//a[contains(text(),'10001')]");
53 waitForTextPresent("AAA Travel");
54 waitForElementNotPresent(By.xpath("//a[contains(text(),'copy')]"));
55 waitForElementNotPresent(By.xpath("//a[contains(text(),'create new')]"));
56 }
57
58 @Test
59 public void testTravelCompanyLookUpDisableNewAndCopyBookmark() throws Exception {
60 testTravelCompanyLookUpDisableNewAndCopy();
61 passed();
62 }
63
64 @Test
65 public void testTravelCompanyLookUpDisableNewAndCopyNav() throws Exception {
66 testTravelCompanyLookUpDisableNewAndCopy();
67 passed();
68 }
69 }