diff --git a/e2e/tests/focus-mode/pomodoro-timer-sync-bug-5954.spec.ts b/e2e/tests/focus-mode/pomodoro-timer-sync-bug-5954.spec.ts index 00ca98d3a..d6a3294ab 100644 --- a/e2e/tests/focus-mode/pomodoro-timer-sync-bug-5954.spec.ts +++ b/e2e/tests/focus-mode/pomodoro-timer-sync-bug-5954.spec.ts @@ -341,17 +341,15 @@ test.describe('Bug #5954: Pomodoro timer sync issues', () => { // When isCurrent changes, the hover controls switch from play to pause button await waitForAngularStability(page); - // Step 2: Stop tracking first to avoid continuous re-renders from progress bar - // Use the task page's toggle method which handles play/pause button - await taskPage.toggleTaskTimeTracking(task); - await expect(task).not.toHaveClass(/isCurrent/, { timeout: 5000 }); - await waitForAngularStability(page); - - // Step 3: Mark task as done (now that tracking is stopped) - await taskPage.markTaskAsDone(task); + // Step 2: Mark task as done using keyboard shortcut + // This bypasses the button click issue caused by continuous re-renders + // from the progress bar while tracking is active + await task.focus(); + await page.keyboard.press('d'); // Keyboard shortcut for toggle done await expect(task).toHaveClass(/isDone/, { timeout: 5000 }); + await expect(task).not.toHaveClass(/isCurrent/, { timeout: 5000 }); - // Step 4: Open focus mode and try to start session + // Step 3: Open focus mode and try to start session await mainFocusButton.click(); await expect(focusModeOverlay).toBeVisible({ timeout: 5000 });