mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Stabilizing test by waiting for the response
Closes #42650 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
parent
0c5b6398a9
commit
63538629db
@ -29,6 +29,7 @@ test.describe("Device activity", () => {
|
||||
.getByRole("button", { name: "Sign out", exact: true })
|
||||
.click();
|
||||
await page2.getByRole("button", { name: "Confirm", exact: true }).click();
|
||||
await expect(page2.getByTestId("last-alert")).toContainText("Signed out");
|
||||
|
||||
// Reload pages and verify the first session is logged out, while the second session remains active.
|
||||
await page1.reload();
|
||||
@ -64,6 +65,12 @@ test.describe("Device activity", () => {
|
||||
.getByRole("button", { name: "Sign out all devices", exact: true })
|
||||
.click();
|
||||
await page2.getByRole("button", { name: "Confirm", exact: true }).click();
|
||||
await expect(
|
||||
page2.getByRole("heading", {
|
||||
name: "Sign in to your account",
|
||||
exact: true,
|
||||
}),
|
||||
).toBeVisible();
|
||||
|
||||
// Reload only the first page (second page is already logged out), and verify both sessions are logged out.
|
||||
await page1.reload();
|
||||
@ -73,12 +80,6 @@ test.describe("Device activity", () => {
|
||||
exact: true,
|
||||
}),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page2.getByRole("heading", {
|
||||
name: "Sign in to your account",
|
||||
exact: true,
|
||||
}),
|
||||
).toBeVisible();
|
||||
} finally {
|
||||
await context1.close();
|
||||
await context2.close();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user