fix board E2E login race
This commit is contained in:
1 parent
f03bf6a917
commit
177ea49469
1 file changed
+2
-1
@@ -327,8 +327,9 @@ const openBoardAsync = async (
|
|||||||
await page.goto(`${baseUrl}/auth/login`);
|
await page.goto(`${baseUrl}/auth/login`);
|
||||||
await page.getByLabel("Username").fill(credentials.username);
|
await page.getByLabel("Username").fill(credentials.username);
|
||||||
await page.locator("#password").fill(credentials.password);
|
await page.locator("#password").fill(credentials.password);
|
||||||
|
const loginRedirect = page.waitForURL(baseUrl, { timeout: 15_000, waitUntil: "commit" });
|
||||||
await page.locator("css=button[type='submit']").click();
|
await page.locator("css=button[type='submit']").click();
|
||||||
await page.waitForURL(baseUrl, { timeout: 15_000 });
|
await loginRedirect;
|
||||||
await page.goto(`${baseUrl}/boards/${boardName}`);
|
await page.goto(`${baseUrl}/boards/${boardName}`);
|
||||||
await expect(page.locator(".grid-stack-item[data-kind='clock'] .clock-wrapper").first()).toBeVisible({
|
await expect(page.locator(".grid-stack-item[data-kind='clock'] .clock-wrapper").first()).toBeVisible({
|
||||||
timeout: 15_000,
|
timeout: 15_000,
|
||||||
|
|||||||
Reference in new issue
Block a user