Skip to content

Commit 85cc5f7

Browse files
committed
test(playwright): reset session before provisioning login
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 8500d57 commit 85cc5f7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

playwright/support/nc-login.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ export async function login(
2525
user: string,
2626
password: string,
2727
): Promise<void> {
28+
// Ensure a previous authenticated session does not leak across persona switches.
29+
await request.get('./logout', {
30+
failOnStatusCode: false,
31+
maxRedirects: 0,
32+
}).catch(() => {})
33+
2834
const tokenResponse = await request.get('./csrftoken', {
2935
failOnStatusCode: true,
3036
})

0 commit comments

Comments
 (0)