File tree Expand file tree Collapse file tree
web-frontend/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ export async function validateLoggedInState(page: Page): Promise<ValidationResul
6363 expect ( userName . length ) . toBeGreaterThan ( 0 ) ;
6464 console . log ( `[validateLoggedInState] User name: ${ userName } ` ) ;
6565
66- // 3. Verify user role text is visible in sidebar (e.g. " user", "admin" )
67- const userRoleText = page . locator ( '.text-sm.text-gray-600' ) . filter ( { hasNotText : '...' } ) ;
68- await expect ( userRoleText ) . toBeVisible ( { timeout : 10000 } ) ;
66+ // 3. Verify "Sticker Collector" text is visible ( sidebar user info )
67+ const stickerCollectorText = page . getByText ( 'Sticker Collector' ) ;
68+ await expect ( stickerCollectorText ) . toBeVisible ( { timeout : 10000 } ) ;
6969
7070 // 4. Verify Sign Out is visible (indicates authenticated state)
7171 const signOut = page . getByText ( 'Sign Out' ) ;
Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ function UserInfo() {
2828 < span className = "block text-sm text-gray-600" >
2929 { isLoading
3030 ? "..."
31- : user ?. role ?. length
32- ? user . role . join ( ", " )
33- : "No roles assigned " }
31+ : user ?. role ?. includes ( "admin" )
32+ ? "Sticker Admin"
33+ : "Sticker Collector " }
3434 </ span >
3535 </ div >
3636 </ div >
You can’t perform that action at this time.
0 commit comments