AI Coach messages bookmarking. Top bar refined.
This commit is contained in:
@@ -333,23 +333,30 @@ Comprehensive test plan for the GymFlow web application, covering authentication
|
||||
**Expected Results:**
|
||||
- All exercises are created successfully with their respective types.
|
||||
|
||||
#### 2.14. A. Workout Plans - Create Plan with AI
|
||||
#### 2.14. A. Workout Plans - Create Plan with AI (Parametrized)
|
||||
|
||||
**File:** `tests/workout-management.spec.ts`
|
||||
**File:** `tests/ai-plan-creation.spec.ts`
|
||||
|
||||
**Steps:**
|
||||
1. Log in as a regular user.
|
||||
2. Navigate to the 'Plans' section.
|
||||
3. Click the '+' FAB button.
|
||||
4. Select 'With AI' option.
|
||||
5. In the AI Side Sheet, enter a prompt (e.g., 'Create a short leg workout with lunges').
|
||||
6. Click 'Generate'.
|
||||
7. Wait for the AI response.
|
||||
5. **Verify Defaults**: Duration 60, Equipment 'No equipment', Level 'Intermediate', Intensity 'Moderate'.
|
||||
6. **Modify Inputs**:
|
||||
- Set Duration to 45 mins.
|
||||
- Set Equipment to 'Free weights'.
|
||||
- Set Level to 'Advanced'.
|
||||
7. Click 'Generate' (mocks AI response).
|
||||
8. **Iterative Flow**:
|
||||
- Verify preview table appears.
|
||||
- Click 'Generate' again.
|
||||
- Click 'Save Plan'.
|
||||
|
||||
**Expected Results:**
|
||||
- A new plan is created and appears in the plans list.
|
||||
- If 'Lunges' did not exist in the user's exercise library, it is created automatically.
|
||||
- The plan contains the exercises described in the prompt.
|
||||
- A new plan is created with the AI-suggested content.
|
||||
- The plan appears in the plans list.
|
||||
- New exercises are created with correct `type` and `isUnilateral` flags.
|
||||
|
||||
#### 2.15. B. Tracker - Empty State AI Prompt
|
||||
|
||||
@@ -1075,3 +1082,57 @@ Comprehensive test plan for the GymFlow web application, covering authentication
|
||||
|
||||
**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:**
|
||||
1. Log in as a regular user.
|
||||
2. Navigate to 'AI Coach'.
|
||||
3. Type a message (e.g., "How to do a pushup?").
|
||||
4. Click 'Send'.
|
||||
5. 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:**
|
||||
1. Send a message to AI Coach and receive a response.
|
||||
2. Click the 'Bookmark' icon on the AI's response.
|
||||
3. Verify a success notification (Snackbar).
|
||||
4. 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:**
|
||||
1. Bookmark at least one message.
|
||||
2. Click the 'Saved Messages' icon in the top bar.
|
||||
3. 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:**
|
||||
1. Open Saved Messages sheet.
|
||||
2. Click 'Delete' (trash icon) on a saved message.
|
||||
3. 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.
|
||||
|
||||
Reference in New Issue
Block a user