From df34014bfeada6f1b4a0054b86ede6bf11b6cfae Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Mon, 11 May 2026 19:00:37 +0200 Subject: [PATCH] fix e2e tests --- e2e/members.spec.ts | 2 +- e2e/projects.spec.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/e2e/members.spec.ts b/e2e/members.spec.ts index 4359cbd4..7fc21a9f 100644 --- a/e2e/members.spec.ts +++ b/e2e/members.spec.ts @@ -907,7 +907,7 @@ test.describe('Employee Sidebar Navigation', () => { // Visible links await expect(employee.page.getByRole('link', { name: 'Dashboard' })).toBeVisible(); - await expect(employee.page.getByRole('link', { name: 'Time' })).toBeVisible(); + await expect(employee.page.getByRole('link', { name: 'Time', exact: true })).toBeVisible(); await expect(employee.page.getByRole('link', { name: 'Calendar' })).toBeVisible(); await expect(employee.page.getByRole('link', { name: 'Projects' })).toBeVisible(); await expect(employee.page.getByRole('link', { name: 'Clients' })).toBeVisible(); diff --git a/e2e/projects.spec.ts b/e2e/projects.spec.ts index 09891f22..e34e4eb5 100644 --- a/e2e/projects.spec.ts +++ b/e2e/projects.spec.ts @@ -694,7 +694,7 @@ test('test that creating a project with estimated time in human-readable format await page.getByLabel('Project Name').fill(newProjectName); // Fill in estimated time using human-readable format - const estimatedTimeInput = page.getByPlaceholder('e.g. 2h 30m or 1.5'); + const estimatedTimeInput = page.getByLabel('Time Estimated'); await estimatedTimeInput.fill('2h 30m'); await estimatedTimeInput.press('Tab'); @@ -722,7 +722,7 @@ test('test that creating a project with estimated time using decimal notation wo await page.getByLabel('Project Name').fill(newProjectName); // Fill in estimated time using decimal notation (1.5 hours = 1h 30m) - const estimatedTimeInput = page.getByPlaceholder('e.g. 2h 30m or 1.5'); + const estimatedTimeInput = page.getByLabel('Time Estimated'); await estimatedTimeInput.fill('1.5'); await estimatedTimeInput.press('Tab'); @@ -750,7 +750,7 @@ test('test that creating a project with estimated time using comma decimal notat await page.getByLabel('Project Name').fill(newProjectName); // Fill in estimated time using comma decimal notation (2,5 hours = 2h 30m) - const estimatedTimeInput = page.getByPlaceholder('e.g. 2h 30m or 1.5'); + const estimatedTimeInput = page.getByLabel('Time Estimated'); await estimatedTimeInput.fill('2,5'); await estimatedTimeInput.press('Tab'); @@ -781,7 +781,7 @@ test('test that updating estimated time on existing project works', async ({ pag await page.getByRole('menuitem').getByText('Edit').first().click(); // Fill in estimated time - const estimatedTimeInput = page.getByPlaceholder('e.g. 2h 30m or 1.5'); + const estimatedTimeInput = page.getByLabel('Time Estimated'); await estimatedTimeInput.fill('4h 15m'); await estimatedTimeInput.press('Tab'); @@ -802,7 +802,7 @@ test('test that estimated time input displays formatted value after blur', async await goToProjectsOverview(page); await page.getByRole('button', { name: 'Create Project' }).click(); - const estimatedTimeInput = page.getByPlaceholder('e.g. 2h 30m or 1.5'); + const estimatedTimeInput = page.getByLabel('Time Estimated'); // Enter time in various formats and check the displayed value await estimatedTimeInput.fill('90');