1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.kim.api.identity;
17
18 import edu.sampleu.admin.AdminTmplMthdAftNavBase;
19 import org.kuali.rice.testtools.common.JiraAwareFailable;
20 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
21 import org.kuali.rice.testtools.selenium.WebDriverUtils;
22
23 import java.util.List;
24
25
26
27
28 public abstract class PermissionAftBase extends AdminTmplMthdAftNavBase {
29
30
31
32
33
34
35 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Permission&channelUrl="
36 + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KNS_LOOKUP_METHOD +
37 "org.kuali.rice.kim.impl.permission.UberPermissionBo&docFormKey=88888888&returnLocation=" +
38 AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK ;
39
40 private String docId;
41 private String permissionName;
42
43 @Override
44 protected String getBookmarkUrl() {
45 return BOOKMARK_URL;
46 }
47
48
49
50
51
52
53 @Override
54 protected String getLinkLocator() {
55 return "Permission";
56 }
57
58 public void testPermissionBookmark(JiraAwareFailable failable) throws Exception {
59
60 selectFrame("iframeportlet");
61 waitAndCreateNew();
62 List<String> params;
63 params=testCreateNewPermission(docId, permissionName);
64
65
66 selectTopFrame();
67 open(WebDriverUtils.getBaseUrlString()+BOOKMARK_URL);
68 selectFrame("iframeportlet");
69 params=testLookUpPermission(params.get(0), params.get(1));
70
71
72 params=testEditPermission(params.get(0), params.get(1));
73
74
75 selectTopFrame();
76 open(WebDriverUtils.getBaseUrlString()+BOOKMARK_URL);
77 selectFrame("iframeportlet");
78 params=testVerifyPermission(params.get(0), params.get(1));
79 passed();
80 }
81
82 public void testPermissionNav(JiraAwareFailable failable) throws Exception {
83
84 gotoCreateNew();
85 List<String> params;
86 params = testCreateNewPermission(docId, permissionName);
87
88
89 selectTopFrame();
90 navigate();
91 params = testLookUpPermission(params.get(0), params.get(1));
92
93
94 params = testEditPermission(params.get(0), params.get(1));
95
96
97 selectTopFrame();
98 navigate();
99 params = testVerifyPermission(params.get(0), params.get(1));
100 passed();
101 }
102 }