e2e tests added. Core & Authentication

This commit is contained in:
AG
2025-12-08 10:18:42 +02:00
parent d284563301
commit 615c3a0cb7
16 changed files with 740 additions and 133 deletions

View File

@@ -302,6 +302,37 @@ Comprehensive test plan for the GymFlow web application, covering authentication
**Expected Results:**
- The 'Name' input field for new exercises correctly prompts for capitalization on mobile keyboards, enhancing user experience.
#### 2.12. B. Exercise Library - Create Unilateral Exercise
**File:** `tests/workout-management.spec.ts`
**Steps:**
1. Log in as a regular user.
2. Navigate to the 'Profile' section -> 'Exercise Manager'.
3. Click 'Create Exercise'.
4. Enter name 'One Arm Row'.
5. Select 'Strength' type.
6. Toggle the 'Unilateral' switch to ON.
7. Click 'Create'.
**Expected Results:**
- The new exercise is created.
- It is marked as unilateral in the database/UI logic (though visual indicator might differ).
#### 2.13. B. Exercise Library - Create Special Type Exercises
**File:** `tests/workout-management.spec.ts`
**Steps:**
1. Log in as a regular user.
2. Create a 'Static' exercise (e.g., 'Plank').
3. Create a 'High Jump' exercise (e.g., 'Box Jump').
4. Create a 'Long Jump' exercise (e.g., 'Broad Jump').
5. Create a 'Plyometric' exercise (e.g., 'Burpees').
**Expected Results:**
- All exercises are created successfully with their respective types.
### 3. III. Workout Tracking
**Seed:** `tests/workout-tracking.spec.ts`
@@ -497,6 +528,52 @@ Comprehensive test plan for the GymFlow web application, covering authentication
- The exercise list filters dynamically as the user types.
- The search field content is cleared on focus.
#### 3.14. C. Active Session - Log Unilateral Set
**File:** `tests/workout-tracking.spec.ts`
**Steps:**
1. Start a Free Workout (or Plan with unilateral exercise).
2. Select a Unilateral exercise (created in 2.12).
3. Enter Weight/Reps.
4. Select 'Left' from the Side selector.
5. Click 'Log Set'.
6. Repeat for 'Right' side.
**Expected Results:**
- Sets are logged with the correct 'Left'/'Right' indicators visible in the history.
#### 3.15. C. Active Session - Log Special Type Set
**File:** `tests/workout-tracking.spec.ts`
**Steps:**
1. Start a Free Workout.
2. Select a Static exercise -> Enter Duration.
3. Select a High Jump exercise -> Enter Height.
4. Select a Long Jump exercise -> Enter Distance.
5. Select a Plyometric exercise -> Enter Reps.
6. Log a set for each.
**Expected Results:**
- Each set is logged with the correct specific metric (Height, Distance, Duration, etc.).
#### 3.16. C. Active Session - Smart Plan Matching
**File:** `tests/workout-tracking.spec.ts`
**Steps:**
1. Start a Plan with 2 exercises (Ex A, Ex B).
2. Log a set for Ex A (matching plan). Verify it counts towards plan progress.
3. Manually search and select Ex B (skipping Ex A).
4. Log a set for Ex B.
**Expected Results:**
- The system detects the mismatch or allows it.
- If "Smart Matching" is strict, it might warn or just log it as an extra set.
- If "Smart Matching" is flexible, it might advance progress for Ex B (depending on spec).
- *Assumption based on Requirements*: "System attempts to match... activeExerciseId returned". Verify the UI updates focus to the relevant step if matched.
### 4. IV. Data & Progress
**Seed:** `tests/data-progress.spec.ts`