Skip to content

Commit f4fb41f

Browse files
authored
Merge pull request #467 from os2display/feature/playwright-calendar-stable-locator
test: stabilize flaky calendar-1-single-booking Playwright test
2 parents ad3bd91 + 56aafa3 commit f4fb41f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

assets/tests/template/template-calendar.spec.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,12 @@ test("calendar-0-single-booking: ui tests", async ({ page }) => {
233233
test("calendar-1-single-booking: ui tests", async ({ page }) => {
234234
await fixTime(page);
235235
await page.goto("/template/calendar-1-single-booking");
236-
await expect(page.getByText("Ledigt")).toHaveCount(1);
237-
await expect(page.getByText("Ledigt")).toBeVisible();
236+
await expect(page.locator(".room-info")).toBeVisible();
237+
238+
const status = page.locator(".status");
239+
await expect(status).toHaveText("Ledigt");
238240

239241
await page.clock.runFor(61000);
240242

241-
await expect(page.getByText("Optaget")).toHaveCount(1);
242-
await expect(page.getByText("Optaget")).toBeVisible();
243+
await expect(status).toHaveText("Optaget");
243244
});

0 commit comments

Comments
 (0)