Refactor: update autoLogin.spec.ts to use waitForSelector (#5045)
refactor: Update autoLogin.spec.ts to use waitForSelector instead of waitForTimeout
This commit is contained in:
parent
8c73d5d147
commit
16d3633c96
1 changed files with 12 additions and 5 deletions
|
|
@ -20,19 +20,26 @@ test.describe(
|
|||
async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.getByText("New Flow", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
await page.waitForSelector('[data-testid="modal-title"]', {
|
||||
timeout: 5000,
|
||||
});
|
||||
|
||||
await page.goto("/login");
|
||||
await page.getByText("New Flow", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
await page.waitForSelector('[data-testid="modal-title"]', {
|
||||
timeout: 5000,
|
||||
});
|
||||
await page.goto("/admin");
|
||||
await page.getByText("New Flow", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
await page.waitForSelector('[data-testid="modal-title"]', {
|
||||
timeout: 5000,
|
||||
});
|
||||
|
||||
await page.goto("/admin/login");
|
||||
await page.getByText("New Flow", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
await page.waitForSelector('[data-testid="modal-title"]', {
|
||||
timeout: 5000,
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue