From 84728f091405fc9e75bc0d12fc70c63e5fe7443c Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Wed, 27 May 2026 13:12:10 +0200 Subject: [PATCH] fix e2e selectors to adapt to reka-ui change; --- e2e/shared-reports.spec.ts | 6 +++--- e2e/time.spec.ts | 6 +++--- e2e/timetracker.spec.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/e2e/shared-reports.spec.ts b/e2e/shared-reports.spec.ts index 9ee2ed1b..ff262b17 100644 --- a/e2e/shared-reports.spec.ts +++ b/e2e/shared-reports.spec.ts @@ -469,7 +469,7 @@ test('test that creating a report with an expiration date works', async ({ page, await datePicker.click(); // Select a date in the next month - const calendarGrid = page.getByRole('grid'); + const calendarGrid = page.getByRole('gridcell').first(); await expect(calendarGrid).toBeVisible({ timeout: 5000 }); await page.getByRole('button', { name: /Next/i }).click(); await page.getByRole('gridcell').filter({ hasText: /^15$/ }).first().click(); @@ -547,7 +547,7 @@ test('test that editing a report to make it public with expiration date works', await datePicker.click(); // Select a date in the next month - const calendarGrid = page.getByRole('grid'); + const calendarGrid = page.getByRole('gridcell').first(); await expect(calendarGrid).toBeVisible({ timeout: 5000 }); await page.getByRole('button', { name: /Next/i }).click(); await page.getByRole('gridcell').filter({ hasText: /^20$/ }).first().click(); @@ -741,7 +741,7 @@ test('test that updating expiration date on already-public report works', async await datePicker.click(); // Select the 25th of next month - const calendarGrid = page.getByRole('grid'); + const calendarGrid = page.getByRole('gridcell').first(); await expect(calendarGrid).toBeVisible({ timeout: 5000 }); await page.getByRole('button', { name: /Next/i }).click(); await page.getByRole('gridcell').filter({ hasText: /^25$/ }).first().click(); diff --git a/e2e/time.spec.ts b/e2e/time.spec.ts index dfd4ba4e..87e1c6dd 100644 --- a/e2e/time.spec.ts +++ b/e2e/time.spec.ts @@ -462,7 +462,7 @@ test('test that setting a date in the create modal works', async ({ page }) => { await startDatePicker.click(); // Wait for calendar to appear - const calendarGrid = page.getByRole('grid'); + const calendarGrid = page.getByRole('gridcell').first(); await expect(calendarGrid).toBeVisible({ timeout: 5000 }); // Navigate to previous month and select the 15th (a day that's always in the middle of the month) @@ -515,7 +515,7 @@ test('test that updating the date via the time entry row range selector works', await startDatePicker.click(); // Wait for the calendar to appear and select a day - const calendarGrid = page.getByRole('grid'); + const calendarGrid = page.getByRole('gridcell').first(); await expect(calendarGrid).toBeVisible({ timeout: 5000 }); // Navigate to previous month and select the 5th @@ -568,7 +568,7 @@ test('test that updating the end date via the time entry row range selector work await endDatePicker.click(); // Wait for the calendar to appear - const calendarGrid = page.getByRole('grid'); + const calendarGrid = page.getByRole('gridcell').first(); await expect(calendarGrid).toBeVisible({ timeout: 5000 }); // Navigate to next month and select the 20th (to ensure end > start) diff --git a/e2e/timetracker.spec.ts b/e2e/timetracker.spec.ts index 58df5b2f..de364e22 100644 --- a/e2e/timetracker.spec.ts +++ b/e2e/timetracker.spec.ts @@ -293,7 +293,7 @@ test('test that setting an end time with a different date via the timetracker ra await endDatePicker.click(); // Calendar should appear - const calendarGrid = page.getByRole('grid'); + const calendarGrid = page.getByRole('gridcell').first(); await expect(calendarGrid).toBeVisible({ timeout: 5000 }); // Navigate to the next month and select a day to ensure end > start