File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,21 +69,21 @@ type LoginOptions = {
69
69
70
70
export async function login ( page : Page , options : LoginOptions = users . admin ) {
71
71
const ctx = page . context ( ) ;
72
- // biome-ignore lint/suspicious/noExplicitAny: shenanigans to make life easier
72
+ // biome-ignore lint/suspicious/noExplicitAny: reset the current user
73
73
( ctx as any ) [ Symbol . for ( "currentUser" ) ] = undefined ;
74
74
await ctx . clearCookies ( ) ;
75
75
await page . goto ( "/login" ) ;
76
76
await page . getByLabel ( "Email" ) . fill ( options . email ) ;
77
77
await page . getByLabel ( "Password" ) . fill ( options . password ) ;
78
78
await page . getByRole ( "button" , { name : "Sign In" } ) . click ( ) ;
79
79
await expectUrl ( page ) . toHavePathName ( "/workspaces" ) ;
80
- // biome-ignore lint/suspicious/noExplicitAny: shenanigans to make life easier
80
+ // biome-ignore lint/suspicious/noExplicitAny: update once logged in
81
81
( ctx as any ) [ Symbol . for ( "currentUser" ) ] = options ;
82
82
}
83
83
84
84
export function currentUser ( page : Page ) : LoginOptions {
85
85
const ctx = page . context ( ) ;
86
- // biome-ignore lint/suspicious/noExplicitAny: shenanigans to make life easier
86
+ // biome-ignore lint/suspicious/noExplicitAny: get the current user
87
87
const user = ( ctx as any ) [ Symbol . for ( "currentUser" ) ] ;
88
88
89
89
if ( ! user ) {
You can’t perform that action at this time.
0 commit comments