1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.krad.reference;
17
18 import org.junit.Test;
19 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
20
21
22
23
24
25 public abstract class TypeBaseAft extends WebDriverLegacyITBase {
26
27 protected abstract String[][] getData();
28
29
30 protected void testEntityType() throws Exception {
31 selectFrameIframePortlet();
32 waitAndClickClearValues();
33
34
35 clickSearch();
36 assertTextPresent(getData());
37 waitAndClickClearValues();
38
39
40 waitAndClickByXpath("//input[@name='lookupCriteria[active]' and @value='Y']");
41 clickSearch();
42 assertTextPresent(getData());
43 waitAndClickClearValues();
44
45
46 waitAndClickByXpath("//input[@name='lookupCriteria[active]' and @value='N']");
47 clickSearch();
48 waitForTextPresent("No values match this search.");
49 waitAndClickClearValues();
50
51
52 waitAndTypeByName("lookupCriteria[code]",getData()[0][0]);
53 clickSearch();
54 assertTextPresent(getData()[0]);
55 waitAndClickClearValues();
56
57
58 waitAndTypeByName("lookupCriteria[name]",getData()[0][1]);
59 clickSearch();
60 assertTextPresent(getData()[0]);
61 waitAndClickClearValues();
62 }
63
64 protected void clickSearch() throws InterruptedException {
65 waitAndClickSearchByText();
66 waitForProgressLoading();
67 }
68
69 @Test
70 public void testTypeBookmark() throws Exception {
71 testEntityType();
72 passed();
73 }
74
75 @Test
76 public void testTypeNav() throws Exception {
77 testEntityType();
78 passed();
79 }
80
81 }