Wait for logout

This commit is contained in:
Hariom Balhara 2023-05-30 19:08:16 +05:30
parent e657e6904b
commit f3194a8f56

View File

@ -35,6 +35,8 @@ test.describe("user can login & logout succesfully", async () => {
const signOutBtn = await page.locator(`text=${signOutLabel}`);
await signOutBtn.click();
await page.waitForURL("/auth/logout");
// Reroute to the home page to check if the login form shows up
await page.goto("/");
await expect(page.locator(`[data-testid=login-form]`)).toBeVisible();