From 5c78e114477d864684ac4d9a1ade7b701e4448d7 Mon Sep 17 00:00:00 2001 From: Claas Date: Tue, 30 Jun 2026 23:23:06 +0200 Subject: [PATCH] Fix timer not selected --- client/e2e/timer.spec.ts | 14 ++++++++++++++ client/src/routes/_app/timer.tsx | 10 ++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/client/e2e/timer.spec.ts b/client/e2e/timer.spec.ts index e7b161f..8031390 100644 --- a/client/e2e/timer.spec.ts +++ b/client/e2e/timer.spec.ts @@ -32,6 +32,20 @@ test("start → pause → resume → discard flow", async ({ page }) => { await expect(page.getByTestId("timer-select-project-dialog")).not.toBeVisible(); }); +test("stopping and selecting a project saves the timer", async ({ page }) => { + await page.getByTestId("timer-start").click(); + await page.getByTestId("timer-pause").click(); + await page.getByTestId("timer-stop").click(); + + const dialog = page.getByTestId("timer-select-project-dialog"); + await expect(dialog).toBeVisible(); + + await dialog.locator("form button").first().click(); + + await expect(page.getByTestId("timer-start")).toBeVisible(); + await expect(dialog).not.toBeVisible(); +}); + test("start → pause → resume flow", async ({ page }) => { await page.getByTestId("timer-start").click(); await expect(page.getByTestId("timer-pause")).toBeVisible(); diff --git a/client/src/routes/_app/timer.tsx b/client/src/routes/_app/timer.tsx index 1c9db56..fcabda3 100644 --- a/client/src/routes/_app/timer.tsx +++ b/client/src/routes/_app/timer.tsx @@ -64,7 +64,10 @@ function EntryRow(properties: { }; return ( -
  • +