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 RoleGroupPermissionResponsibilityTypeAft extends WebDriverLegacyITBase {
29
30
31
32
33
34
35
36 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Role/Group/Permission/Responsibility%20Type&channelUrl="
37 + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD +
38 "org.kuali.rice.kim.impl.type.KimTypeBo&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("Role/Group/Permission/Responsibility Type");
50 }
51
52
53 protected void testRoleGroupPermissionResponsibilityType() throws Exception {
54 selectFrameIframePortlet();
55 waitAndClickClearValues();
56
57
58 clickSearch();
59 waitForTextPresent("Namespace or Component");
60 String[][] data = {{"KUALI", "Default", "1","true"},
61 {"KR-NS", "Namespace or Component", "10","true"}};
62 assertTextPresent(data);
63 waitAndClickClearValues();
64
65
66 waitAndClickByXpath("//input[@name='lookupCriteria[active]' and @value='Y']");
67 clickSearch();
68 assertTextPresent(data);
69 waitAndClickClearValues();
70
71
72 waitAndClickByXpath("//input[@name='lookupCriteria[active]' and @value='N']");
73 clickSearch();
74 waitForTextPresent("No values match this search.");
75 waitAndClickClearValues();
76
77
78 selectByName("lookupCriteria[namespaceCode]","KUALI - Kuali Systems");
79 clickSearch();
80 String[] assertSearchResultForTypeCode = {"KUALI", "Default", "1","true"};
81 waitForTextPresent("Default");
82 assertTextPresent(assertSearchResultForTypeCode);
83 waitAndClickClearValues();
84
85
86 waitAndTypeByName("lookupCriteria[name]","KUALI");
87 clickSearch();
88 String[] assertSearchResultForTypeName = {"KUALI", "Default", "1","true"};
89 assertTextPresent(assertSearchResultForTypeName);
90 waitAndClickClearValues();
91
92
93 waitAndTypeByName("lookupCriteria[id]","1");
94 clickSearch();
95 String[] assertSearchResultForShortCode = {"KUALI", "Default", "1","true"};
96 assertTextPresent(assertSearchResultForShortCode);
97 waitAndClickClearValues();
98 }
99
100 protected void clickSearch() throws InterruptedException {
101 waitAndClickSearchByText();
102 }
103
104 @Test
105 public void testRoleGroupPermissionResponsibilityTypeBookmark() throws Exception {
106 testRoleGroupPermissionResponsibilityType();
107 passed();
108 }
109
110 @Test
111 public void testRoleGroupPermissionResponsibilityTypeNav() throws Exception {
112 testRoleGroupPermissionResponsibilityType();
113 passed();
114 }
115 }