File tree Expand file tree Collapse file tree 4 files changed +27
-22
lines changed Expand file tree Collapse file tree 4 files changed +27
-22
lines changed Original file line number Diff line number Diff line change @@ -128,11 +128,9 @@ export const IAM_PAGES = {
128
128
ACCOUNT : "/identity/account" ,
129
129
ACCOUNT_ADD : "/identity/account/new-account" ,
130
130
USER_SA_ACCOUNT_ADD : "/identity/users/new-user-sa/:userName" ,
131
-
132
- /* Access */
133
- POLICIES : "/access/policies" ,
134
- POLICY_ADD : "/access/add-policy" ,
135
- POLICIES_VIEW : "/access/policies/*" ,
131
+ POLICIES : "/identity/policies" ,
132
+ POLICY_ADD : "/identity/add-policy" ,
133
+ POLICIES_VIEW : "/identity/policies/*" ,
136
134
/* Monitoring */
137
135
TOOLS_LOGS : "/tools/logs" ,
138
136
TOOLS_AUDITLOGS : "/tools/audit-logs" ,
Original file line number Diff line number Diff line change @@ -107,15 +107,15 @@ export const validRoutes = (
107
107
icon : AccountsMenuIcon ,
108
108
forceDisplay : true ,
109
109
} ,
110
+ {
111
+ name : "Policies" ,
112
+ component : NavLink ,
113
+ id : "policies" ,
114
+ to : IAM_PAGES . POLICIES ,
115
+ icon : AccessMenuIcon ,
116
+ } ,
110
117
] ,
111
118
} ,
112
- {
113
- name : "Access" ,
114
- component : NavLink ,
115
- id : "access" ,
116
- to : IAM_PAGES . POLICIES ,
117
- icon : AccessMenuIcon ,
118
- } ,
119
119
120
120
{
121
121
name : "Monitoring" ,
Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ import * as roles from "../utils/roles";
18
18
import * as elements from "../utils/elements" ;
19
19
import * as constants from "../utils/constants" ;
20
20
import { Selector } from "testcafe" ;
21
- import { iamPoliciesElement } from "../utils/elements-menu" ;
21
+ import {
22
+ iamPoliciesElement ,
23
+ identityElement ,
24
+ usersElement ,
25
+ } from "../utils/elements-menu" ;
22
26
23
27
const iamPolicyListItem = Selector (
24
28
".ReactVirtualized__Table__rowColumn"
@@ -37,7 +41,12 @@ fixture("For user with IAM Policies permissions")
37
41
38
42
test ( "IAM Policies sidebar item exists" , async ( t ) => {
39
43
const iamPoliciesExist = iamPoliciesElement . exists ;
40
- await t . expect ( iamPoliciesExist ) . ok ( ) ;
44
+ await t
45
+ . expect ( identityElement . exists )
46
+ . ok ( )
47
+ . click ( identityElement )
48
+ . expect ( iamPoliciesExist )
49
+ . ok ( ) ;
41
50
} ) ;
42
51
43
52
test ( "Create Policy button exists" , async ( t ) => {
Original file line number Diff line number Diff line change @@ -55,18 +55,16 @@ export const identityChildren = Selector("#identity-children");
55
55
56
56
export const usersElement = identityChildren
57
57
. find ( "a" )
58
- . withAttribute ( "href" , "/identity/users" ) ;
58
+ . withAttribute ( "href" , IAM_PAGES . USERS ) ;
59
59
export const groupsElement = identityChildren
60
60
. find ( "a" )
61
- . withAttribute ( "href" , "/identity/groups" ) ;
61
+ . withAttribute ( "href" , IAM_PAGES . GROUPS ) ;
62
62
export const serviceAcctsElement = identityChildren
63
63
. find ( "a" )
64
- . withAttribute ( "href" , "/identity/account" ) ;
65
-
66
- export const iamPoliciesElement = sidebarItem . withAttribute (
67
- "href" ,
68
- "/access/policies"
69
- ) ;
64
+ . withAttribute ( "href" , IAM_PAGES . ACCOUNT ) ;
65
+ export const iamPoliciesElement = identityChildren
66
+ . find ( "a" )
67
+ . withAttribute ( "href" , IAM_PAGES . POLICIES ) ;
70
68
71
69
export const configurationsElement = Selector ( ".MuiPaper-root" )
72
70
. find ( "ul" )
You can’t perform that action at this time.
0 commit comments