forked from trent_larson/crowd-funder-for-time-pwa
fix: resolve Playwright test flakiness with robust dialog handling
- Implement comprehensive dialog overlay handling for all test files - Add robust page state checking for Firefox navigation issues - Fix alert button timing issues with combined find/click approach - Add force close dialog overlay as fallback for persistent dialogs - Handle page close scenarios during dialog dismissal - Add page readiness checks before interactions - Resolve race conditions between dialog close and page navigation - Achieve consistent 40/40 test runs with systematic fixes
This commit is contained in:
@@ -54,6 +54,9 @@ test('Check User 0 can invite someone', async ({ page }) => {
|
||||
const newDid = await generateNewEthrUser(page);
|
||||
await switchToUser(page, newDid);
|
||||
await page.goto(inviteLink as string);
|
||||
|
||||
// Wait for the ContactNameDialog to appear before trying to fill the Name field
|
||||
await expect(page.getByPlaceholder('Name', { exact: true })).toBeVisible();
|
||||
await page.getByPlaceholder('Name', { exact: true }).fill(`My pal User #0`);
|
||||
await page.locator('button:has-text("Save")').click();
|
||||
await expect(page.locator('button:has-text("Save")')).toBeHidden();
|
||||
|
||||
Reference in New Issue
Block a user