Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions workout-tracker/e2e/timer-notification.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ test.describe('Rest Timer Notification Reliability', () => {
const vibrateCount = await page.evaluate(() => (window as any).__vibrateCount);
expect(vibrateCount).toBe(1);

// Timer should be hidden
await expect(page.locator('#rest-timer')).toBeHidden();
// Timer should show expired state (active countdown stopped)
await expect(page.locator('[data-testid="timer-expired"]')).toBeVisible();
});
});
4 changes: 1 addition & 3 deletions workout-tracker/src/ui/workout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ export async function renderWorkout(container: HTMLElement): Promise<void> {
el.dataset.testid = 'timer-expired';
const timerValue = document.getElementById('timer-value');
if (timerValue) timerValue.textContent = "Time's Up!";
// Hide skip button during expired state
const skipBtn = document.getElementById('skip-timer-btn');
if (skipBtn) skipBtn.classList.add('hidden');

Expand All @@ -386,7 +385,6 @@ export async function renderWorkout(container: HTMLElement): Promise<void> {
};

el.addEventListener('click', dismiss);
// Auto-dismiss after 10 seconds
setTimeout(dismiss, 10000);
}

Expand Down Expand Up @@ -586,7 +584,7 @@ export async function renderWorkout(container: HTMLElement): Promise<void> {
await putTimerState(null);
cancelBackgroundTimerNotification();
fireTimerNotification();
showTimerExpired(timerEl);
timerEl.classList.add('hidden');
}
}

Expand Down
Loading