Rest timer polishing. Rest timer sets done
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -110,10 +110,15 @@ The core feature. States: **Idle**, **Active Session**, **Sporadic Mode**.
|
||||
* **Persistence**: The last manually set value becomes the new default for the user.
|
||||
* **Planned Session**:
|
||||
* **Config**: Each step in a plan can have a specific `restTime` (seconds).
|
||||
* **Auto-Set**: When a set is logged, the timer resets to the value defined for the *current* step.
|
||||
* **Auto-Set**: When a set is logged, the timer RESETS (updates duration) to the value defined for the *current* step, but does **NOT** start automatically.
|
||||
* **Fallback**: If plan step has no `restTime`, use User's default.
|
||||
* **Behavior**:
|
||||
* **Start**: Manual trigger by user.
|
||||
* **Start**: Manual trigger by user (NEVER auto-starts).
|
||||
* **Edit Value**:
|
||||
* **Input**: Manual entry via FAB expand menu.
|
||||
* **Format**: Strict "MM:SS" format (digits and colon only).
|
||||
* **Constraints**: Max value `99:59`. Seconds > 59 are automatically clamped to 59.
|
||||
* **Alignment**: Digits are right-aligned; input width is fixed to tightly fit `00:00`.
|
||||
* **Countdown**: Visual display.
|
||||
* **Completion**:
|
||||
* Audio signal (3 seconds).
|
||||
|
||||
Reference in New Issue
Block a user