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.AutomatedFunctionalTestUtils;
20 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21 import org.kuali.rice.testtools.selenium.WebDriverUtils;
22
23
24
25
26
27
28 public class EntityTypeAft extends WebDriverLegacyITBase {
29
30
31
32
33
34
35
36 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Entity%20Type&channelUrl="
37 + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD +
38 "org.kuali.rice.kim.impl.identity.EntityTypeBo&returnLocation="
39 + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
40
41 @Override
42 protected String getBookmarkUrl() {
43 return BOOKMARK_URL;
44 }
45
46 @Override
47 protected void navigate() throws InterruptedException {
48 waitAndClickKRAD();
49 waitAndClickByLinkText("Entity Type");
50 }
51
52
53 protected void testEntityType() throws Exception {
54 selectFrameIframePortlet();
55 waitAndClickButtonByText("Search");
56 assertTextPresent(new String[][]{{"PERSON"}, {"SYSTEM"}});
57 waitAndClickByXpath("//input[@name='lookupCriteria[active]' and @value='N']");
58 waitAndClickButtonByText("Search");
59 waitForTextNotPresent("PERSON");
60 waitAndTypeByName("lookupCriteria[code]","PERSON");
61 waitAndClickButtonByText("Search");
62 waitForTextNotPresent("SYSTEM");
63 assertTextPresent("PERSON");
64 }
65
66 @Test
67 public void testEntityTypeBookmark() throws Exception {
68 testEntityType();
69 passed();
70 }
71
72 @Test
73 public void testEntityTypeNav() throws Exception {
74 testEntityType();
75 passed();
76 }
77 }