Rest timer polishing. Rest timer sets done

This commit is contained in:
AG
2025-12-11 21:46:38 +02:00
parent c509a8be24
commit 138fe0c432
8 changed files with 286 additions and 134 deletions

View File

@@ -565,6 +565,60 @@ Comprehensive test plan for the GymFlow web application, covering authentication
**Expected Results:**
- Each set is logged with the correct specific metric (Height, Distance, Duration, etc.).
#### 3.16. C. Rest Timer - Manual Edit & Validation
**File:** `tests/rest-timer.spec.ts`
**Steps:**
1. Start a Free Workout (or Quick Log).
2. Expand the Rest Timer FAB.
3. Click 'Edit'.
4. Type '90' -> Verify '1:30' (if auto-format implemented) or manual '1:30'.
5. Attempt to type non-digits -> Verify they are ignored.
6. Attempt to type '10:99' (invalid seconds) -> Verify it corrects to '10:59'.
7. Save.
**Expected Results:**
- Input field accepts only valid characters.
- Seconds are clamped to 59.
- Timer value updates correctly upon save.
#### 3.17. C. Rest Timer - Context & Persistence
**File:** `tests/rest-timer.spec.ts`
**Steps:**
1. Start a Free Workout (Idle Timer defaults to 2:00 or user profile setting).
2. Edit timer to '0:45'.
3. Start timer.
4. Quit session (or navigate to Quick Log).
5. Start Quick Log (or new Free Session).
6. Verify timer default is now '0:45'.
**Expected Results:**
- Timer value persists across different session modes (active to sporadic).
- Last manually set value becomes the new default for manual modes.
#### 3.18. C. Rest Timer - Plan Integration
**File:** `tests/rest-timer.spec.ts`
**Steps:**
1. Create a Plan with Step A (Rest: 30s) and Step B (Rest: 60s).
2. Start the Plan.
3. Verify Timer shows '0:30'. Start it.
4. Log Set for Step A while timer is running.
5. Verify Timer continues running (does not reset).
6. Reset Timer manually (or wait for finish).
7. Verify Timer now shows '1:00' (for Step B).
**Expected Results:**
- Timer accurately reflects specific rest times per step.
- Active timer is NOT interrupted by logging sets (smart non-reset).
- Timer updates duration to next step's rest time once idle/reset, but remains PAUSED/IDLE (does not auto-start).
### 4. IV. Data & Progress