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.Ignore;
19 import org.junit.Test;
20 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
21 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
22 import org.kuali.rice.testtools.selenium.WebDriverUtils;
23
24
25
26
27
28
29 public class AddressTypeAft extends WebDriverLegacyITBase {
30
31
32
33
34
35
36 public static final String BOOKMARK_URL =
37 AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Address%20Type&channelUrl=" + WebDriverUtils
38 .getBaseUrlString() + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD +
39 "org.kuali.rice.kim.impl.identity.address.EntityAddressTypeBo&renderReturnLink=true";
40
41 protected void clickSearch() throws InterruptedException {
42 waitAndClickButtonByText("Search");
43 }
44
45 @Override
46 protected String getBookmarkUrl() {
47 return BOOKMARK_URL;
48 }
49
50 @Override
51 protected void navigate() throws InterruptedException {
52 waitAndClickKRAD();
53 waitAndClickByLinkText("Address Type");
54 }
55
56
57 protected void testAddressType() throws Exception {
58 selectFrameIframePortlet();
59 clickSearch();
60
61 String[][] data = {{"HM", "Home", "b"},
62 {"OTH", "Other", "c"},
63 {"WRK", "Work", "a"}};
64 assertTextPresent(data);
65 }
66
67 protected void testAddressTypeNoResults() throws Exception {
68 selectFrameIframePortlet();
69 waitAndClickByXpath("//input[@value='N']");
70 clickSearch();
71 waitForTextPresent("No values match this search.");
72 }
73
74 @Test
75 public void testAddressTypeBookmark() throws Exception {
76 testAddressType();
77 assertTextPresent("return value");
78 passed();
79 }
80
81 @Test
82 @Ignore("2.3 doesn't display 'No values match this search.'")
83 public void testAddressTypeNoResultsBookmark() throws Exception {
84 testAddressTypeNoResults();
85 passed();
86 }
87
88 @Test
89 public void testAddressTypeNav() throws Exception {
90 testAddressType();
91 assertTextNotPresent("return value");
92 passed();
93 }
94
95 @Test
96 @Ignore("2.3 doesn't display 'No values match this search.'")
97 public void testAddressTypeNoResultsNav() throws Exception {
98 testAddressTypeNoResults();
99 passed();
100 }
101 }