Update Deliverable_3 authored by Aron Calderon (ewy439)'s avatar Aron Calderon (ewy439)
......@@ -496,6 +496,46 @@ As GrandGourmetGary, I want to see how my recipes are performing compared to oth
| **TC29 – US3** | New recipe affects score | Create recipe → Update score | Score +15 | Rank updates +15 | Updated by 15 | Pass |
| **TC30 – US3** | View chef score breakdown | Home → Click “\>” | — | Chef score + graph displayed | Score + pie graph shown | Pass |
## Testcases - Aron
## **User Story 3 – AI Recipe Generation (10 Test Cases)**
### User Story:
As Campus Chris, I want to enter specific ingredients I already have, then the system should automatically (using AI) generate a new recipe that adapts to those ingredients, customizing quantities, cooking time, and any missing items with substitutions.
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Result | Actual Result | Pass/Fail |
|--------------|---------------|------------|-----------|------------------|---------------|-----------|
| **TC-TT-021 – US3** | AI recipe generation happy path | Enter "chicken, rice, garlic" → Click Generate Recipe | ingredients: chicken, rice, garlic | AI returns full customized recipe (quantities + cooking time) | --- | --- |
| **TC-TT-022 – US3** | Validate ingredient field required | Leave ingredient field empty → Click Generate | ingredients: "" | Error: "Please enter at least one ingredient" | --- | --- |
| **TC-TT-023 – US3** | AI handles 1 ingredient | Enter "eggs" → Generate | ingredients: eggs | AI generates simple recipe or suggests missing items | --- | --- |
| **TC-TT-024 – US3** | AI generates substitutions | Enter "pasta, tomato" → Generate | ingredients: pasta, tomato | At least 1 substitution shown | --- | --- |
| **TC-TT-025 – US3** | AI customizes cooking time | Enter ingredients → Generate | ingredients: ground beef, onions | Output includes cooking duration | --- | --- |
| **TC-TT-026 – US3** | AI customizes ingredient quantities | Enter "potatoes, butter" → Generate | ingredients: potatoes, butter | Recipe lists measurable quantities | --- | --- |
| **TC-TT-027 – US3** | AI handles long ingredient list | Enter 12 ingredients → Generate | ingredients: long list | Valid structured recipe still produced | --- | --- |
| **TC-TT-028 – US3** | AI rejects invalid characters | Enter "@@@🔥🔥" → Generate | ingredients: @@@🔥🔥 | Error: "Invalid ingredient input" | --- | --- |
| **TC-TT-029 – US3** | AI handles rare ingredients | Enter "saffron" → Generate | ingredients: saffron | AI gives recipe or alternatives | --- | --- |
| **TC-TT-030 – US3** | Displays loading state during AI fetch | Enter ingredients → Generate | ingredients: chicken, onions | Shows "Loading…" animation during fetch | --- | --- |
---
## **User Story 4 – Favourite Recipes (10 Test Cases)**
### User Story:
As Campus Chris, I want to create a list that contains my favourite recipes.
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Result | Actual Result | Pass/Fail |
|--------------|---------------|------------|-----------|------------------|---------------|-----------|
| **TC-TT-031 – US4** | Add recipe to favourites happy path | Open recipe → Click "Add to Favourites" | recipeId: 101 | Recipe added + confirmation toast | --- | --- |
| **TC-TT-032 – US4** | Prevent duplicate favourites | Click "Add to Favourites" twice | recipeId: 101 | Error: "Already in favourites" | --- | --- |
| **TC-TT-033 – US4** | Remove recipe from favourites | Open favourites → Click Remove | recipeId: 204 | Item removed, list updates | --- | --- |
| **TC-TT-034 – US4** | Empty favourites list | Navigate to Favourites page | none | Shows "No favourite recipes yet" | --- | --- |
| **TC-TT-035 – US4** | Persistence across sessions | Add favourite → Logout → Login → Check | recipeId: 501 | Favourite still saved | --- | --- |
| **TC-TT-036 – US4** | Favourites load within 2 seconds | Go to Favourites page | none | List loads < 2 seconds | --- | --- |
| **TC-TT-037 – US4** | Requires authentication | Logged out → Click "Add to Favourites" | recipeId: 88 | Redirect to Login page | --- | --- |
| **TC-TT-038 – US4** | Heart icon state correct | View recipe card | recipeId: 303 | Filled heart = favourited, outline = not | --- | --- |
| **TC-TT-039 – US4** | Favourites show recipe details | Open Favourites page | recipeId: random | Displays title, image, cook time, ingredients | --- | --- |
| **TC-TT-040 – US4** | Backend failure handling | Simulate server error → Add favourite | recipeId: 300 | Error toast: "Unable to save favourite" | --- | --- |
**3. Inspection/Review** **- As a group, customize the code inspection document/checklist (which will be provided in the lecture) and add other appropriate items to fit your product (giving us an exact replica of the checklist will be a zero).**
**_General_**
......
......