File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,11 +182,11 @@ describe('header utils', () => {
182182 } ) ;
183183 const actualItems =
184184 renderHook ( ( ) => useSettingMenuItems ( 'course-123' ) , { wrapper : createWrapper ( ) } ) . result . current ;
185- const rolesPermissionsItem = actualItems . find ( item => item . href === '# ' ) ;
186- expect ( rolesPermissionsItem ) . toBeDefined ( ) ;
187- expect ( rolesPermissionsItem ?. href ) . toBe ( '#' ) ;
188- // Check that title is a React element (since it now uses a span with onClick)
189- expect ( typeof rolesPermissionsItem ?. title ) . toBe ( 'object' ) ;
185+ const rolesPermissionsItem = actualItems . find ( item => item . title === 'Roles and Permissions ' ) ;
186+ expect ( rolesPermissionsItem ) . toEqual ( {
187+ href : 'http://admin-console.example.com/authz?scope=course-123' ,
188+ title : 'Roles and Permissions' ,
189+ } ) ;
190190 } ) ;
191191 } ) ;
192192
You can’t perform that action at this time.
0 commit comments