34 KiB
GymFlow Application Test Plan
Application Overview
Comprehensive test plan for the GymFlow web application, covering authentication, workout management, tracking, data visualization, user/admin management, and adaptive GUI responsiveness. This plan is based on the provided requirements.md.
Test Scenarios
1. I. Core & Authentication
Seed: tests/core-auth.spec.ts
1.1. A. Login - Successful Authentication
File: tests/core-auth.spec.ts
Steps:
- Navigate to the login page (http://192.168.50.234:3000/).
- Enter a valid email in the email field.
- Enter a valid password in the password field.
- Click the 'Login' button.
Expected Results:
- User is redirected to the main application dashboard (e.g., Tracker view).
- No error messages are displayed.
1.2. A. Login - Invalid Credentials
File: tests/core-auth.spec.ts
Steps:
- Navigate to the login page.
- Enter an invalid email or password.
- Click the 'Login' button.
Expected Results:
- An error message 'Invalid credentials' or similar is displayed.
- User remains on the login page.
1.3. A. Login - First-Time Password Change
File: tests/core-auth.spec.ts
Steps:
- Navigate to the login page.
- Log in with a first-time user's temporary credentials.
- Enter a new password (at least 4 characters).
- Click 'Save' or 'Change Password' button.
Expected Results:
- User is prompted to change password on first login.
- New password is set successfully.
- User is logged into the application.
- No error messages are displayed.
1.4. A. Login - First-Time Password Change (Password too short)
File: tests/core-auth.spec.ts
Steps:
- Navigate to the login page.
- Log in with a first-time user's temporary credentials.
- Enter a new password less than 4 characters.
- Click 'Save' or 'Change Password' button.
Expected Results:
- An error message 'Password too short' is displayed.
- User remains on the password change screen.
1.5. A. Login - Language Selection (English)
File: tests/core-auth.spec.ts
Steps:
- Navigate to the login page.
- Select 'English' from the language dropdown.
Expected Results:
- All UI text elements on the login page are displayed in English.
1.6. A. Login - Language Selection (Russian)
File: tests/core-auth.spec.ts
Steps:
- Navigate to the login page.
- Select 'Русский' from the language dropdown.
Expected Results:
- All UI text elements on the login page are displayed in Russian.
1.7. B. Navigation - Desktop Navigation Rail
File: tests/core-auth.spec.ts
Steps:
- Log in as a regular user.
- Ensure the browser window is wide enough to trigger desktop layout (e.g., >768px width).
- Verify the vertical navigation rail is present on the left side.
- Click on each navigation item (Tracker, Plans, History, Stats, AI Coach, Profile).
Expected Results:
- The corresponding section of the application is displayed for each click.
- The navigation rail remains visible and functional.
1.8. B. Navigation - Mobile Bottom Navigation Bar
File: tests/core-auth.spec.ts
Steps:
- Log in as a regular user.
- Ensure the browser window is narrow enough to trigger mobile layout (e.g., <768px width).
- Verify the bottom navigation bar is present.
- Click on each navigation item (Tracker, Plans, History, Stats, AI Coach, Profile).
Expected Results:
- The corresponding section of the application is displayed for each click.
- The bottom navigation bar remains visible and functional.
2. II. Workout Management
Seed: tests/workout-management.spec.ts
2.1. A. Workout Plans - Create New Plan
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Plans' section.
- Click the 'Add New Plan' or '+' FAB button.
- Enter a 'Plan Name' (e.g., 'My New Strength Plan').
- Enter a 'Description' (e.g., 'Focus on compound lifts').
- Add an exercise to the plan.
- Click 'Save'.
Expected Results:
- A new plan with the specified name and description appears in the plans list.
- The plan contains the added exercise.
- No error messages are displayed.
2.2. A. Workout Plans - Edit Existing Plan
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Plans' section.
- Create a new plan (if none exist).
- Click the 'Edit' icon for an existing plan.
- Modify the 'Plan Name' and 'Description'.
- Add/remove exercises, or reorder them.
- Click 'Save'.
Expected Results:
- The plan is updated with the new name, description, and exercise list.
- No error messages are displayed.
2.3. A. Workout Plans - Delete Plan
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Plans' section.
- Create a new plan (if none exist).
- Click the 'Delete' icon for an existing plan.
- Confirm deletion when prompted.
Expected Results:
- The plan is removed from the list.
- No error messages are displayed.
2.4. A. Workout Plans - Reorder Exercises within a Plan
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Plans' section.
- Create a plan with at least two exercises.
- Enter the plan editor.
- Drag an exercise to a new position.
- Verify the order changes.
- Click 'Save'.
Expected Results:
- Exercises are reordered correctly within the plan editor.
- The reordered plan is saved and reflected in the view.
2.5. A. Workout Plans - Start Session from Plan
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Plans' section.
- Create a plan with at least one exercise.
- Click 'Start' button for the created plan.
- If a plan description is present, confirm the plan start.
Expected Results:
- The application transitions to the 'Active Session' view.
- The session starts with the selected plan's exercises.
- The timer starts running.
2.5a. A. Workout Plans - Create Plan from Session
File: tests/plan-from-session.spec.ts
Steps:
- User completes a session with multiple sets (e.g., 2 sets of Pushups, 1 set of Squats).
- Navigate to 'History'.
- Click 'Create Plan' from the session menu.
- Verify the Plan Editor opens.
- Verify Steps: The plan should contain exactly 3 steps (Pushups, Pushups, Squats).
Expected Results:
- The Plan Editor is pre-filled.
- Plan steps mirror the session sets 1:1.
2.6. B. Exercise Library - Create Custom Exercise (Strength)
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Expand 'Exercise Manager'.
- Click 'Create Exercise'.
- Enter an exercise name (e.g., 'Custom Bicep Curl').
- Select 'Strength' as the type.
- Click 'Create'.
Expected Results:
- The new exercise appears in the exercise list.
- The exercise type is correctly displayed as Strength.
- No error messages.
2.7. B. Exercise Library - Create Custom Exercise (Bodyweight with %)
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Expand 'Exercise Manager'.
- Click 'Create Exercise'.
- Enter an exercise name (e.g., 'Advanced Push-up').
- Select 'Bodyweight' as the type.
- Enter '50' for 'Body Weight Percentage'.
- Click 'Create'.
Expected Results:
- The new exercise appears in the exercise list.
- The exercise type is correctly displayed as Bodyweight with 50% body weight percentage.
- No error messages.
2.8. B. Exercise Library - Edit Exercise Name
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Expand 'Exercise Manager'.
- Click the 'Edit' icon for an existing exercise.
- Change the exercise name.
- Click 'Save'.
Expected Results:
- The exercise name is updated in the list.
- No error messages.
2.9. B. Exercise Library - Archive/Unarchive Exercise
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Expand 'Exercise Manager'.
- Click the 'Archive' icon for an existing exercise.
- Verify the exercise is marked as archived (or disappears if filtered).
- Toggle 'Show Archived' checkbox.
- Click the 'Unarchive' icon for the same exercise.
Expected Results:
- Exercise is archived and unarchived successfully.
- Visibility changes correctly based on 'Show Archived' filter.
2.10. B. Exercise Library - Filter Exercises by Name
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Expand 'Exercise Manager'.
- Enter a partial exercise name into the filter field.
- Verify only matching exercises are displayed.
Expected Results:
- The exercise list is dynamically filtered to show only exercises whose names contain the typed text.
2.11. B. Exercise Library - New Exercise Name field capitalization (mobile)
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Plans' section.
- Click the 'Add New Plan' or '+' FAB button.
- Click 'Add Exercise', then 'Create Exercise'.
- Verify the virtual keyboard for the 'Exercise Name' field suggests capitalizing each word (e.g.,
text-transform: capitalizeorinputmode="text" autocapitalize="words").
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:
- Log in as a regular user.
- Navigate to the 'Profile' section -> 'Exercise Manager'.
- Click 'Create Exercise'.
- Enter name 'One Arm Row'.
- Select 'Strength' type.
- Toggle the 'Unilateral' switch to ON.
- 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:
- Log in as a regular user.
- Create a 'Static' exercise (e.g., 'Plank').
- Create a 'High Jump' exercise (e.g., 'Box Jump').
- Create a 'Long Jump' exercise (e.g., 'Broad Jump').
- Create a 'Plyometric' exercise (e.g., 'Burpees').
Expected Results:
- All exercises are created successfully with their respective types.
2.14. A. Workout Plans - Create Plan with AI (Parametrized)
File: tests/ai-plan-creation.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Plans' section.
- Click the '+' FAB button.
- Select 'With AI' option.
- Verify Defaults: Duration 60, Equipment 'No equipment', Level 'Intermediate', Intensity 'Moderate'.
- Modify Inputs:
- Set Duration to 45 mins.
- Set Equipment to 'Free weights'.
- Set Level to 'Advanced'.
- Click 'Generate' (mocks AI response).
- Iterative Flow:
- Verify preview table appears.
- Click 'Generate' again.
- Click 'Save Plan'.
Expected Results:
- A new plan is created with the AI-suggested content.
- The plan appears in the plans list.
- New exercises are created with correct
typeandisUnilateralflags.
2.15. B. Tracker - Empty State AI Prompt
File: tests/workout-management.spec.ts
Steps:
- Log in as a regular user with no existing plans.
- Navigate to the 'Tracker' section (Idle View).
- Verify the placeholder message "No workout plans yet." is displayed.
- Click the "Ask your AI coach to create one" link.
Expected Results:
- User is navigated to the Plans view.
- The AI Side Sheet is automatically opened.
3. III. Workout Tracking
Seed: tests/workout-tracking.spec.ts
3.1. B. Idle State - Start Free Workout
File: tests/workout-tracking.spec.ts
Steps:
- Log in as a regular user.
- Ensure the tracker is in the idle state.
- Enter a body weight in the input field (e.g., '75.5').
- Click 'Free Workout' button.
Expected Results:
- The application transitions to 'Active Session' view.
- The timer starts.
- The entered body weight is displayed in the active session header.
3.2. B. Idle State - Start Quick Log
File: tests/workout-tracking.spec.ts
Steps:
- Log in as a regular user.
- Ensure the tracker is in the idle state.
- Click 'Quick Log' button.
Expected Results:
- The application transitions to 'Sporadic Logging' view.
3.3. B. Idle State - Body Weight Defaults from Profile
File: tests/workout-tracking.spec.ts
Steps:
- Log in as a regular user.
- Change weight in profile to '75.5'.
- Navigate to the 'Tracker' section (Idle View).
- Ensure the 'My Weight' field defaults to '75.5'.
Expected Results:
- The 'My Weight' field in the Idle View defaults to the weight specified in the user's profile.
3.4. C. Active Session - Log Strength Set
File: tests/workout-tracking.spec.ts
Steps:
- Start a 'Free Workout' session (ensure body weight is set).
- Select a Strength exercise (e.g., 'Bench Press').
- Enter 'Weight' (e.g., '80') and 'Reps' (e.g., '5').
- Click 'Log Set'.
Expected Results:
- The set is added to the session history.
- Input fields are cleared.
- No error messages are displayed.
3.5. C. Active Session - Log Bodyweight Set
File: tests/workout-tracking.spec.ts
Steps:
- Start a 'Free Workout' session.
- Select a Bodyweight exercise (e.g., 'Pull-up').
- Enter 'Weight' as positive (e.g., '10') and verify. Then enter negative (e.g. '-30') and verify.
- Enter 'Reps' (e.g., '8').
- Click 'Log Set'.
Expected Results:
- The set is added to the session history.
- Input fields are cleared.
- Body weight percentage is used in calculations.
- Displayed weight includes sign:
+10 kgor-30 kg. - No error messages are displayed.
3.6. C. Active Session - Log Cardio Set
File: tests/workout-tracking.spec.ts
Steps:
- Start a 'Free Workout' session.
- Select a Cardio exercise (e.g., 'Running').
- Enter 'Time (sec)' (e.g., '300') and 'Distance (m)' (e.g., '1000').
- Click 'Log Set'.
Expected Results:
- The set is added to the session history.
- Input fields are cleared.
- No error messages are displayed.
3.7. C. Active Session - Edit Logged Set
File: tests/workout-tracking.spec.ts
Steps:
- Start a 'Free Workout' session.
- Log at least one set.
- Click the 'Edit' icon for a logged set.
- Modify 'Weight' or 'Reps'.
- Click 'Save'.
Expected Results:
- The set's details are updated in the session history.
- No error messages.
3.8. C. Active Session - Delete Logged Set
File: tests/workout-tracking.spec.ts
Steps:
- Start a 'Free Workout' session.
- Log at least one set.
- Click the 'Delete' icon for a logged set.
- Confirm deletion.
Expected Results:
- The set is removed from the session history.
- No error messages.
3.9. C. Active Session - Finish Session
File: tests/workout-tracking.spec.ts
Steps:
- Start a 'Free Workout' session.
- Log at least one set.
- Click 'Finish' button.
- Confirm finishing the session.
Expected Results:
- Session data is saved.
- User is returned to the 'Idle State' of the Tracker.
- No error messages.
3.10. C. Active Session - Quit Session Without Saving
File: tests/workout-tracking.spec.ts
Steps:
- Start a 'Free Workout' session.
- Log at least one set.
- Click 'More' (three dots) menu.
- Select 'Quit Without Saving'.
- Confirm quitting.
Expected Results:
- Session data is discarded.
- User is returned to the 'Idle State' of the Tracker.
- No error messages.
3.11. C. Active Session - Plan Progression and Jump to Step
File: tests/workout-tracking.spec.ts
Steps:
- Start a session from a workout plan with multiple steps.
- Log sets for the first exercise in the plan until it's considered complete.
- Observe the plan progression to the next step.
- Click on the plan progression bar to expand the plan list.
- Click on a different (e.g., third) step in the expanded plan list.
Expected Results:
- The current exercise automatically advances to the next planned exercise.
- Clicking a step in the plan list navigates the active session to that exercise.
3.12. D. Sporadic Logging - Log Strength Sporadic Set
File: tests/workout-tracking.spec.ts
Steps:
- Log in as a regular user.
- Navigate to 'Quick Log' mode.
- Select a Strength exercise.
- Enter 'Weight' and 'Reps'.
- Click 'Log Set'.
Expected Results:
- The sporadic set is added to today's history in the Sporadic Logging view.
- Input fields are cleared.
- A success message is briefly displayed.
3.13. D. Sporadic Logging - Exercise Search and Clear
File: tests/workout-tracking.spec.ts
Steps:
- Log in as a regular user.
- Navigate to 'Quick Log' mode.
- Type a partial exercise name into the 'Select Exercise' field (e.g., 'ben').
- Verify the list of exercises is filtered.
- Click on the 'Select Exercise' field again (or focus it).
Expected Results:
- 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:
- Start a Free Workout (or Plan with unilateral exercise).
- Select a Unilateral exercise (created in 2.12).
- Enter Weight/Reps.
- Select 'L' from the Side selector.
- Click 'Log Set'.
- Repeat for 'R' side.
- Repeat for 'A' side.
- Click 'Edit' on one of the logged sets.
- Change side using the 'L'/'A'/'R' buttons and save.
Expected Results:
- Sets are logged with the correct 'Left'/'Right'/'Alternately' indicators visible in the history.
- The Edit mode correctly shows 'L'/'A'/'R' buttons and updates the set side upon save.
3.15. C. Active Session - Log Special Type Set
File: tests/workout-tracking.spec.ts
Steps:
- Start a Free Workout.
- Select a Static exercise -> Enter Duration.
- Select a High Jump exercise -> Enter Height.
- Select a Long Jump exercise -> Enter Distance.
- Select a Plyometric exercise -> Enter Reps.
- Log a set for each.
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:
- Start a Free Workout (or Quick Log).
- Expand the Rest Timer FAB.
- Click 'Edit'.
- Type '90' -> Verify '1:30' (if auto-format implemented) or manual '1:30'.
- Attempt to type non-digits -> Verify they are ignored.
- Attempt to type '10:99' (invalid seconds) -> Verify it corrects to '10:59'.
- 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:
- Start a Free Workout (Idle Timer defaults to 2:00 or user profile setting).
- Edit timer to '0:45'.
- Start timer.
- Quit session (or navigate to Quick Log).
- Start Quick Log (or new Free Session).
- 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.17. B. Idle State - Days Off Training Logic
File: tests/workout-tracking.spec.ts
Steps:
- Log in as a new user (0 workouts).
- Verify message: "Do your very first workout today.".
- Start and Finish a Free Workout.
- Verify message: "Last workout: Today".
Expected Results:
- Messages update dynamically based on workout history.
- "Ready?" text is NOT visible.
3.18. C. Rest Timer - Plan Integration
File: tests/rest-timer.spec.ts
Steps:
- Create a Plan with Step A (Rest: 30s) and Step B (Rest: 60s).
- Start the Plan.
- Verify Timer shows '0:30'. Start it.
- Log Set for Step A while timer is running.
- Verify Timer continues running (does not reset).
- Reset Timer manually (or wait for finish).
- 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
Seed: tests/data-progress.spec.ts
4.1. A. Session History - View Past Sessions
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Complete at least one workout session and log at least one sporadic set.
- Navigate to the 'History' section.
Expected Results:
- All past workout sessions and sporadic sets are displayed, grouped by date.
- Each entry shows key summary information (date, duration, plan name, total work, exercise count).
4.2. A. Session History - View Detailed Session
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Complete at least one workout session.
- Navigate to the 'History' section.
- Click on a workout session entry.
Expected Results:
- A detailed view of the session opens, showing all individual sets with their metrics.
- Session start/end times and body weight are displayed.
4.3. A. Session History - Edit Past Session Details
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Complete a workout session.
- Navigate to the 'History' section.
- Open the detailed view of a session.
- Modify the 'Start Time', 'End Time', or 'Body Weight'.
- Click 'Save'.
Expected Results:
- Session details are updated successfully.
- The changes are reflected in the history view.
4.4. A. Session History - Edit Individual Set in Past Session
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Complete a workout session with multiple sets.
- Navigate to the 'History' section.
- Open the detailed view of a session.
- Click the 'Edit' icon for an individual set.
- Modify a metric (e.g., weight, reps).
- Click 'Save'.
Expected Results:
- The individual set's metrics are updated.
- The changes are reflected in the detailed session view.
4.5. A. Session History - Delete Past Session
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Complete a workout session.
- Navigate to the 'History' section.
- Click the 'Delete' icon for a session.
- Confirm deletion.
Expected Results:
- The session is permanently removed from the history.
- No error messages.
4.6. A. Session History - Edit Sporadic Set
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Log at least one sporadic set.
- Navigate to the 'History' section.
- Locate and click the 'Edit' icon for a sporadic set.
- Modify a metric (e.g., weight, reps, duration).
- Click 'Save'.
Expected Results:
- The sporadic set's metrics are updated.
- The changes are reflected in the history view.
4.7. A. Session History - Delete Sporadic Set
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Log at least one sporadic set.
- Navigate to the 'History' section.
- Locate and click the 'Delete' icon for a sporadic set.
- Confirm deletion.
Expected Results:
- The sporadic set is permanently removed from the history.
- No error messages.
4.8. B. Performance Statistics - View Volume Chart
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Complete at least two workout sessions with logged sets.
- Navigate to the 'Stats' section.
Expected Results:
- The 'Total Volume' line chart is displayed.
- The chart accurately reflects the total weight lifted per session over time.
4.9. B. Performance Statistics - View Set Count Chart
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Complete at least two workout sessions with logged sets.
- Navigate to the 'Stats' section.
Expected Results:
- The 'Set Count' bar chart is displayed.
- The chart accurately reflects the number of sets performed per session over time.
4.10. B. Performance Statistics - View Body Weight Chart
File: tests/data-progress.spec.ts
Steps:
- Log in as a regular user.
- Log body weight at least twice (e.g., via profile or session start).
- Navigate to the 'Stats' section.
Expected Results:
- The 'Body Weight' line chart is displayed.
- The chart accurately reflects the user's body weight changes over time.
5. V. User & System Management
Seed: tests/user-system-management.spec.ts
5.1. A. User Profile - Update Personal Information
File: tests/user-system-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Modify 'Weight', 'Height', 'Birth Date', and 'Gender'.
- Click 'Save Profile'.
Expected Results:
- Profile information is updated successfully.
- A success snackbar message is displayed.
- The updated information is reflected upon refreshing the profile or re-logging in.
5.2. A. User Profile - Change Password
File: tests/user-system-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Enter a new password (min 4 characters) in the 'Change Password' field.
- Click 'OK'.
Expected Results:
- Password change is successful.
- A success message is displayed.
- The user can log in with the new password.
5.3. A. User Profile - Change Password (Too Short)
File: tests/user-system-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Enter a password less than 4 characters in the 'Change Password' field.
- Click 'OK'.
Expected Results:
- An error message 'Password too short' is displayed.
- Password is not changed.
5.4. A. User Profile - Dedicated Daily Weight Logging
File: tests/user-system-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Expand 'Weight Tracker'.
- Enter today's weight (e.g., '72.3').
- Click 'Log' button.
Expected Results:
- The weight is logged for the current day.
- The new record appears in the weight history list.
- A success snackbar message is displayed.
5.5. A. User Profile - Language Preference Change
File: tests/user-system-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Profile' section.
- Select a different language (e.g., 'Русский') from the language dropdown.
- Click 'Save Profile'.
Expected Results:
- The UI language immediately switches to the selected language.
- The preference persists across sessions.
5.6. A. User Profile - Delete Own Account
File: tests/user-system-management.spec.ts
Steps:
- Log in as a regular user (not admin).
- Navigate to the 'Profile' section.
- Locate 'Delete Account' section.
- Click 'Delete' button.
- Confirm deletion when prompted.
Expected Results:
- User account is deleted.
- User is logged out and redirected to the login page.
5.7. B. AI Coach - Send a Message
File: tests/user-system-management.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'AI Coach' section.
- Type a message into the input field (e.g., 'What's a good workout for chest?').
- Click 'Send' button.
Expected Results:
- User's message appears in the chat.
- AI Coach responds with relevant advice.
- No error messages.
5.8. C. Admin Panel - Create New User
File: tests/user-system-management.spec.ts
Steps:
- Log in as an 'ADMIN' user.
- Navigate to the 'Profile' section.
- Expand 'Admin Area'.
- Enter a new 'Email' and 'Password' for a new user.
- Click 'Create User'.
Expected Results:
- A new user is created and appears in the user list.
- A success message is displayed.
- The new user can log in with the created credentials.
5.9. C. Admin Panel - View User List
File: tests/user-system-management.spec.ts
Steps:
- Log in as an 'ADMIN' user.
- Navigate to the 'Profile' section.
- Expand 'Admin Area'.
- Click to expand 'Users List'.
Expected Results:
- A list of all users (excluding the current admin) is displayed, showing their email, role, and blocked status.
5.10. C. Admin Panel - Block/Unblock User
File: tests/user-system-management.spec.ts
Steps:
- Log in as an 'ADMIN' user.
- Navigate to the 'Profile' section.
- Expand 'Admin Area' and 'Users List'.
- Locate a non-admin user.
- Click the 'Block' icon for that user.
- Verify the user's status changes to 'Blocked'.
- Click the 'Unblock' icon for the same user.
Expected Results:
- User is blocked and unblocked successfully.
- Status updates are reflected in the user list.
5.11. C. Admin Panel - Reset User Password
File: tests/user-system-management.spec.ts
Steps:
- Log in as an 'ADMIN' user.
- Navigate to the 'Profile' section.
- Expand 'Admin Area' and 'Users List'.
- Locate a non-admin user.
- Enter a new password (min 4 characters) in the 'Reset Password' field for that user.
- Click 'Reset Pass' button.
Expected Results:
- User's password is reset.
- A success alert is displayed.
- The user can log in with the new password.
5.12. C. Admin Panel - Delete User
File: tests/user-system-management.spec.ts
Steps:
- Log in as an 'ADMIN' user.
- Navigate to the 'Profile' section.
- Expand 'Admin Area' and 'Users List'.
- Locate a non-admin user.
- Click the 'Delete' icon for that user.
- Confirm deletion.
Expected Results:
- The user is permanently removed from the system.
- The user no longer appears in the user list.
5.13. A. Default Exercises - Creation on Signup
File: tests/default-exercises.spec.ts
Steps:
- Register a NEW user via API or UI.
- Log in as that user.
- Navigate to Profile -> Exercise Manager (or query API).
- Verify the list of exercises.
Expected Results:
- The user has a pre-populated list of exercises (e.g., Push-Ups, Squats, Sprint).
- The exercises match the configuration in
server/default_exercises.csv. - Properties like
typeandisUnilateralare correctly set.
6. VI. User Interface & Experience
Seed: tests/ui-ux.spec.ts
6.1. A. Adaptive GUI - Mobile Navigation (Width < 768px)
File: tests/ui-ux.spec.ts
Steps:
- Log in as a regular user.
- Resize the browser window to a mobile width (e.g., 375px).
- Verify the bottom navigation bar is visible and functional.
- Verify the desktop navigation rail is hidden.
Expected Results:
- Bottom navigation bar is present with correct icons and labels.
- Desktop navigation rail is not visible.
6.2. A. Adaptive GUI - Desktop Navigation (Width >= 768px)
File: tests/ui-ux.spec.ts
Steps:
- Log in as a regular user.
- Resize the browser window to a desktop width (e.g., 1280px).
- Verify the vertical navigation rail is visible and functional.
- Verify the mobile bottom navigation bar is hidden.
Expected Results:
- Vertical navigation rail is present with correct icons and labels.
- Mobile bottom navigation bar is not visible.
6.3. A. Adaptive GUI - Fluid Layout Responsiveness
File: tests/ui-ux.spec.ts
Steps:
- Log in as a regular user.
- Navigate through various sections (e.g., Plans, Profile, History).
- Gradually resize the browser window from desktop to mobile widths and vice-versa.
Expected Results:
- Content layouts adapt smoothly to different screen sizes without horizontal scrolling or overlapping elements.
- All interactive elements remain accessible and usable.
6.4. A. Adaptive GUI - Responsive Charts in Stats
File: tests/ui-ux.spec.ts
Steps:
- Log in as a regular user.
- Navigate to the 'Stats' section.
- Gradually resize the browser window from desktop to mobile widths and vice-versa.
Expected Results:
- The volume, set count, and body weight charts resize and re-render correctly, maintaining readability and data integrity across different screen sizes.
7. VII. AI Coach Features
Seed: tests/ai-coach.spec.ts
7.1. A. AI Coach - Basic Conversation & Markdown
File: tests/ai-coach.spec.ts
Steps:
- Log in as a regular user.
- Navigate to 'AI Coach'.
- Type a message (e.g., "How to do a pushup?").
- Click 'Send'.
- Verify response appears.
Expected Results:
- AI responds with a message.
- Response renders Markdown correctly (e.g., bullet points, bold text).
7.2. A. AI Coach - Bookmark Message
File: tests/ai-coach.spec.ts
Steps:
- Send a message to AI Coach and receive a response.
- Click the 'Bookmark' icon on the AI's response.
- Verify a success notification (Snackbar).
- Reload the page.
Expected Results:
- The message remains bookmarked (icon state persists).
7.3. A. AI Coach - View Saved Messages
File: tests/ai-coach.spec.ts
Steps:
- Bookmark at least one message.
- Click the 'Saved Messages' icon in the top bar.
- Verify the Saved Messages sheet opens.
Expected Results:
- The sheet displays the bookmarked message content.
- The content is rendered in Markdown.
7.4. A. AI Coach - Delete Bookmark
File: tests/ai-coach.spec.ts
Steps:
- Open Saved Messages sheet.
- Click 'Delete' (trash icon) on a saved message.
- Confirm if necessary (or verify immediate deletion).
Expected Results:
- The message is removed from the list.
- The bookmark icon in the main chat (if message is visible) updates to unbookmarked state.