@@ -5,14 +5,16 @@ import { II_URL } from "../../utils";
55test . describe ( "Manage identities" , ( ) => {
66 test . use ( {
77 identityConfig : {
8- createIdentities : [ { name : "Alice" } , { name : "Bob" } ] ,
8+ createIdentities : [ { name : "Alice" } , { name : "Bob" } , { name : "Carol" } ] ,
99 } ,
1010 } ) ;
1111
1212 test . beforeEach (
1313 async ( { page, managePage, identities, signInWithIdentity } ) => {
14- // Sign in with both identities to populate the switcher
14+ // Sign in with all identities to populate the switcher
1515 await page . goto ( II_URL ) ;
16+ await signInWithIdentity ( page , identities [ 2 ] . identityNumber ) ;
17+ await managePage . signOut ( ( c ) => c . keepIdentity ( ) ) ;
1618 await signInWithIdentity ( page , identities [ 1 ] . identityNumber ) ;
1719 await managePage . signOut ( ( c ) => c . keepIdentity ( ) ) ;
1820 await signInWithIdentity ( page , identities [ 0 ] . identityNumber ) ;
@@ -69,7 +71,7 @@ test.describe("Manage identities", () => {
6971 // Dismiss the toast
7072 await page . getByRole ( "button" , { name : "Close" } ) . click ( ) ;
7173
72- // Open switcher and verify identity is gone
74+ // Open switcher and verify identity is gone from the manage dialog
7375 await managePage . openIdentitySwitcher ( async ( switcher ) => {
7476 await switcher . manageIdentities ( async ( dialog ) => {
7577 await dialog . assertIdentityHidden ( identities [ 1 ] . name ) ;
@@ -107,11 +109,10 @@ test.describe("Sign out confirmation", () => {
107109 await confirmation . keepIdentity ( ) ;
108110 } ) ;
109111
110- // Identity should still be in the switcher
111- await page . getByRole ( "button" , { name : "Switch identity" } ) . click ( ) ;
112+ // Identity should still appear on the landing page header
112113 await expect (
113- page . getByRole ( "button" , { name : identities [ 0 ] . name } ) ,
114- ) . toBeVisible ( ) ;
114+ page . getByRole ( "button" , { name : "Switch identity" } ) ,
115+ ) . toContainText ( identities [ 0 ] . name ) ;
115116 } ) ;
116117
117118 test ( "sign out and remove from device" , async ( {
0 commit comments