fix(test): hermetically exercise auth workflows
This commit is contained in:
@@ -142,9 +142,10 @@ test("OIDC Authorization Code plus PKCE redirects back and maps ordinary and adm
|
||||
expect(stack.lastAuthorization()).toMatchObject({ codeChallengeMethod: "S256", pkceVerified: true });
|
||||
await expectNoWebStorageTokens(page);
|
||||
|
||||
await page.getByRole("button", { name: "Log out", exact: true }).click();
|
||||
await expect(page.getByRole("heading", { name: "Sign in to ThothII" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Log out", exact: true })).toHaveCount(0);
|
||||
await page.context().clearCookies();
|
||||
stack.setOidcIdentity("admin");
|
||||
await page.goto(stack.publicUrl);
|
||||
await signInWithOidc(page);
|
||||
await expectShell(page);
|
||||
expect((await browserSession(page)).body.roles).toEqual(["admin"]);
|
||||
|
||||
Reference in New Issue
Block a user