Fix flaky E2E tests with proper selectors and response waits
- Use data-testid attributes to target specific day cards in availability tests - Wait for networkidle before interacting with page elements - Set up PUT and GET response listeners before triggering actions - Add retry logic for availability API in booking tests - Fix appointments test to handle multiple 'Booked' elements with .first() - Increase parallel workers to 12 for faster test execution
This commit is contained in:
parent
b3e00b0745
commit
89eec1e9c4
8 changed files with 120 additions and 294 deletions
|
|
@ -178,8 +178,8 @@ test.describe("Appointments Page - With Bookings", () => {
|
|||
// Click No to abort
|
||||
await page.getByRole("button", { name: "No" }).click();
|
||||
|
||||
// Should still show as booked
|
||||
await expect(page.getByText("Booked", { exact: true })).toBeVisible();
|
||||
// Should still show as booked (use first() since there may be multiple bookings)
|
||||
await expect(page.getByText("Booked", { exact: true }).first()).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue