diff --git a/frontend/e2e/exchange.spec.ts b/frontend/e2e/exchange.spec.ts index 2866511..619913d 100644 --- a/frontend/e2e/exchange.spec.ts +++ b/frontend/e2e/exchange.spec.ts @@ -97,10 +97,12 @@ test.describe("Exchange Page - Regular User Access", () => { // Test date selection appears after continue await page.getByRole("button", { name: "Continue to Booking" }).click(); await expect(page.getByRole("heading", { name: "Select a Date" })).toBeVisible(); - const dateButtons = page - .locator("button") - .filter({ hasText: /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)/ }); - await expect(dateButtons.first()).toBeVisible(); + // Date formatting uses Spanish locale (es-ES), so weekdays are in Spanish: Lun, Mar, Mié, Jue, Vie, Sáb, Dom + // Use data-testid selector which is more reliable than text matching + // Wait for at least one date button to appear (they have data-testid="date-YYYY-MM-DD") + await expect(page.locator('button[data-testid^="date-"]').first()).toBeVisible({ + timeout: 10000, + }); }); });