diff --git a/js/apps/account-ui/test/account-security/device-activity.spec.ts b/js/apps/account-ui/test/account-security/device-activity.spec.ts index a9270cc0509..d27c2c1051f 100644 --- a/js/apps/account-ui/test/account-security/device-activity.spec.ts +++ b/js/apps/account-ui/test/account-security/device-activity.spec.ts @@ -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();