Update Deliverable_3 authored by Herin Patel (axg863)'s avatar Herin Patel (axg863)
Deliverable 3
The Debuggers
Deliverable 3 The Debuggers
**1. Product Version 2 (roughly 75% of the project implemented):**
New epics implemented:
- As a health conscious individual with dietary restrictions, I want to find recipes that filter out my allergies and utilize leftovers so I can cook regularly at home, avoid processed food and reduce eating out.
**2. Test/QA Plan (should contain the following info):**
**Introduction - A brief description of the quality assurance strategies you are using**
- As a health conscious individual with dietary restrictions, I want to find recipes that filter out my allergies and utilize leftovers so I can cook regularly at home, avoid processed food and reduce eating out.
- _**Manual Unit Testing:**_ Individual frontend components (search bar, filter dropdowns, recipe cards, comment inputs, rating stars, photo upload sections, profile settings) and backend API endpoints ( recipe CRUD routes, search/filter APIs, authentication routes, comments/ratings APIs). The goal is to confirm that each part works properly in isolation.
- _**Manual Integration Testing**_ - After unit-level checks, we test how different modules interact. Examples include verifying that search inputs correctly communicate with the backend, recipes load all required details, uploaded photos appear properly, user authentication persists across pages, filters update results in real time, and comments/ratings or saved recipes sync properly with the database. This ensures the system behaves correctly when components depend on each other.
- _**System Testing:**_ We run complete end-to-end tests in the browser to simulate full user journeys. This covers user sign-in, searching or filtering recipes, creating and uploading recipes, and interacting with recipe pages. These tests evaluate the whole app as a single working system.
- _**Acceptance Testing**_- Each user story is checked against its acceptance criteria. Team members act as the personas and verify that the feature behaves the way it was described in the backlog and in the acceptance tests.
- _**Regression Testing**_- Whenever we introduce new features or update existing ones, we re-test previously completed features: search, filtering, recipe creation, AI generation, photo uploads, comments/ratings, and leaderboard updates. This helps ensure older functionality continues to work after new changes.
- _**User Interface Testing**_ - We manually inspect how the UI behaves across different pages. This includes checking button responsiveness, form validation, search interactions, dropdown filters, photo previews, page layouts, and overall usability. The goal is to ensure that the interface is clean, intuitive, and consistent across the entire application.
**2. Test/QA Plan (should contain the following info):** **Introduction - A brief description of the quality assurance strategies you are using**
- **_Manual Unit Testing:_** Individual frontend components (search bar, filter dropdowns, recipe cards, comment inputs, rating stars, photo upload sections, profile settings) and backend API endpoints ( recipe CRUD routes, search/filter APIs, authentication routes, comments/ratings APIs). The goal is to confirm that each part works properly in isolation.
- **_Manual Integration Testing_** - After unit-level checks, we test how different modules interact. Examples include verifying that search inputs correctly communicate with the backend, recipes load all required details, uploaded photos appear properly, user authentication persists across pages, filters update results in real time, and comments/ratings or saved recipes sync properly with the database. This ensures the system behaves correctly when components depend on each other.
- **_System Testing:_** We run complete end-to-end tests in the browser to simulate full user journeys. This covers user sign-in, searching or filtering recipes, creating and uploading recipes, and interacting with recipe pages. These tests evaluate the whole app as a single working system.
- **_Acceptance Testing_**- Each user story is checked against its acceptance criteria. Team members act as the personas and verify that the feature behaves the way it was described in the backlog and in the acceptance tests.
- **_Regression Testing_**- Whenever we introduce new features or update existing ones, we re-test previously completed features: search, filtering, recipe creation, AI generation, photo uploads, comments/ratings, and leaderboard updates. This helps ensure older functionality continues to work after new changes.
- **_User Interface Testing_** - We manually inspect how the UI behaves across different pages. This includes checking button responsiveness, form validation, search interactions, dropdown filters, photo previews, page layouts, and overall usability. The goal is to ensure that the interface is clean, intuitive, and consistent across the entire application.
**Scope - The features/requirements/user stories (functional and non-functional) that will be checked and those that will not be checked.**
**Features to be tested:**
_**1. User Profile Management**_
**_1. User Profile Management_**
- Creating a profile with personal details
- Editing profile information
- Ensuring profile information is correctly displayed to other users
- Verifying that authentication works when users perform profile-related actions
**_2. Search and Filter System_**
_**2. Search and Filter System**_
- Searching by a single ingredient
- Searching by multiple ingredients
- Searching by title
......@@ -41,7 +39,8 @@ _**2. Search and Filter System**_
- Exclude ingredients
- Ensuring the “Clear All Filters” button resets filters and search results properly
_**3. Recipe Listing & Recipe Detail Pages**_
**_3. Recipe Listing & Recipe Detail Pages_**
- Displaying recipes with all required details (title, ingredients, steps, author, date, images)
- Ensuring recipe cards load correctly in the search results
- Accurate rendering of photos and instructions on the recipe detail page
......@@ -50,8 +49,8 @@ _**3. Recipe Listing & Recipe Detail Pages**_
- Generated recipe formatting
- Image and ingredient inclusion when applicable
**_4. Comments and Ratings_**
_**4. Comments and Ratings**_
- Posting a comment as a logged-in user
- Ensuring multiple users can comment on the same recipe
- Liking/disliking individual comments
......@@ -61,20 +60,23 @@ _**4. Comments and Ratings**_
- Updating the average rating when new ratings are submitted
- Displaying the username and timestamp for each comment
_**5. Recipe Creation System**_
**_5. Recipe Creation System_**
- Creating a recipe with all required fields (title, ingredients, instructions, description)
- Uploading one or more photos
- Validating required fields before allowing recipe submission
- Ensuring the new recipe appears in the recipe list after creation
_**6. Leaderboard System**_
**_6. Leaderboard System_**
- Loading and displaying leaderboard rankings
- Sorting recipes correctly based on rating or score
- Showing rank, recipe title, and score for each entry
- Highlighting or identifying the user’s own recipes within the leaderboard
- Updating leaderboard order when new ratings are added
_**7. General System Behaviours**_
**_7. General System Behaviours_**
- User authentication flow (login/logout)
- Navigation between pages (home → search → details → comments, etc.)
- Error handling (empty fields, invalid input, API errors)
......@@ -83,6 +85,7 @@ _**7. General System Behaviours**_
**Features to not be tested:**
These items are beyond the scope of the current milestone:
- Internal processes of any third-party services
- Database backup and recovery procedures
- Server hosting, infrastructure performance, or load balancing
......@@ -91,7 +94,8 @@ These items are beyond the scope of the current milestone:
**3. Test Methodology**
_**Deliverables**_
**_Deliverables_**
- Test Plan Document (this document)
- Test Cases for each user story (minimum 10 per user story)
- Bug Reports documented through GitLab Issues
......@@ -99,10 +103,10 @@ _**Deliverables**_
- Final Acceptance Test Summary for completed epics
- Regression Test Checklist used during each new feature deployment
**_Strategies/Approaches_**
_**Strategies/Approaches**_
**_1. Unit Testing (Manual)_**
_**1. Unit Testing (Manual)**_
- Focus on individual components and backend endpoints.
- Example targets: comment submission function, rating calculation logic, search filter behaviour, recipe creation form validation, file upload handling, etc.
- Verified using:
......@@ -112,7 +116,8 @@ _**1. Unit Testing (Manual)**_
- Database validation by checking if the correct records were created or updated after API calls (new recipe entry, comment saved, rating recorded, etc.)
- Goal: Ensure each module works independently as expected.
_**2. Integration Testing**_
**_2. Integration Testing_**
- Ensures that different modules communicate properly and work together as expected.
- Examples include:
- Comment form → backend API → database storage
......@@ -122,7 +127,8 @@ _**2. Integration Testing**_
- Leaderboard → database rating data → sorted ranking display
- Integration testing is done after each major feature or epic is completed.
_**3. System Testing**_
**_3. System Testing_**
- End-to-end testing of the entire application in a real browser.
- Validates full user workflows, such as:
- Logging in → searching → opening a recipe → commenting → liking/disliking → rating
......@@ -131,12 +137,14 @@ _**3. System Testing**_
- Viewing the leaderboard → checking ranking order and scores
- System testing covers overall functionality and basic non-functional aspects like usability and layout consistency.
_**4. Acceptance Testing**_
**_4. Acceptance Testing_**
- Based directly on the acceptance criteria written for each user story.
- Team members test features as if they were real users from the personas.
- A feature is “accepted” only when all acceptance criteria are met with no outstanding issues.
_**5. Regression Testing**_
**_5. Regression Testing_**
- Re-runs important tests after any new feature, update, or fix is added.
- Ensures previously working features—search, filters, recipe creation, comments, ratings, profile pages, and the leaderboard—still behave correctly.
- Regression testing is done:
......@@ -144,7 +152,8 @@ _**5. Regression Testing**_
- After fixing medium or high-severity bugs
- After adding or updating backend endpoints
_**6. User Interface (UI) Testing**_
**_6. User Interface (UI) Testing_**
- UI testing checks that the application looks and behaves correctly from the user’s point of view. This includes:
- Verifying all forms and inputs work properly (search, filters, recipe creation, comments, ratings).
- Making sure navigation between pages is smooth and consistent.
......@@ -154,9 +163,10 @@ _**6. User Interface (UI) Testing**_
- Reviewing layout and responsiveness on different screen sizes.
- UI testing is done manually in the browser to ensure the interface is clear, usable, and consistent.
_**Bug Reporting**_
**_Bug Reporting_**
All bugs identified during testing follow this workflow:
- Bug Identification: The tester finds unexpected or incorrect behaviour.
- Reproduction: The tester repeats the steps to confirm the issue is consistent.
- Documentation: Each bug includes:
......@@ -169,122 +179,109 @@ All bugs identified during testing follow this workflow:
- The tester re-runs the test case to verify the fix.
- Regression Testing: Surrounding features are tested to ensure no new bugs were introduced.
**_Test Tools_**
_**Test Tools**_
- Postman: Used to manually test backend API endpoints (comments, ratings, authentication, recipe creation, and search queries).
- Chrome DevTools: Used for debugging UI behavior, inspecting network requests, monitoring console logs, and testing responsiveness.
- Browser-Based Manual Testing: Used to manually verify user flows, UI states, and interactions.
- GitLab Issues: Used for bug tracking, prioritization, and progress updates.
- VS Code Debugger (used as needed): Used during development to inspect code execution and debug logic errors.
_**Test Cases**_
**_Test Cases_**
**Epic 1: As HomeCookHerin, I want to explore and interact with recipes from various cuisines so that I can learn to cook new dishes and find inspiration (Amna's Epic)**
User Story 1: As HomeCookHerin, I want to search for recipes by cuisine type and filter results by main ingredient so I can quickly find recipes that match my interests.
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|--------------------------------------------------------------|----------------------------------------------------------------------------|-----------------|--------------------------------------------------------|----------------|-----------|
| TC-SEARCH-01 | Verify search results display recipes tagged with Thai cuisine. | 1. Go to Search page.<br>2. Select "Thai" from the cuisine dropdown.<br>3. Click "Search". | Cuisine = Thai | Only recipes tagged as Thai cuisine are displayed. |Only shows the "Thai" Recipes. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-01 | Verify search results display recipes tagged with Thai cuisine. | 1\. Go to Search page.<br>2. Select "Thai" from the cuisine dropdown.<br>3. Click "Search". | Cuisine = Thai | Only recipes tagged as Thai cuisine are displayed. | Only shows the "Thai" Recipes. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|-------------------------------------------|---------------------------------------------------------------------------------------------|--------------------------|-------------------------------------------|----------------|-----------|
| TC-SEARCH-02 | Verify system handles empty search results | 1. Go to Search page.<br>2. Select "Chinese".<br>3. Click "Search". | Cuisine = Chinese | “No recipes found” message is displayed. | "No recipes found" was displayed. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-02 | Verify system handles empty search results | 1\. Go to Search page.<br>2. Select "Chinese".<br>3. Click "Search". | Cuisine = Chinese | “No recipes found” message is displayed. | "No recipes found" was displayed. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------|--------------------------------------|-----------------------------------------------------------|----------------|-----------|
| TC-SEARCH-03 | Verify ingredient filter refines Thai cuisine results | 1. Search for Thai cuisine.<br>2. Type "chicken" in ingredient filter.<br>3. Click "Apply Filter". | Cuisine = Thai, Ingredient = chicken | Only Thai recipes containing chicken are displayed. | Only Thai recipes that contain chicken were displayed. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-03 | Verify ingredient filter refines Thai cuisine results | 1\. Search for Thai cuisine.<br>2. Type "chicken" in ingredient filter.<br>3. Click "Apply Filter". | Cuisine = Thai, Ingredient = chicken | Only Thai recipes containing chicken are displayed. | Only Thai recipes that contain chicken were displayed. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|-----------------------------------------------|--------------------------------------------------------------------------------------------|------------------------------------|--------------------------------------------|----------------|-----------|
| TC-SEARCH-04 | Verify ingredient filter handles zero matches | 1. Search for Thai cuisine.<br>2. Type "lamb" in ingredient filter.<br>3. Click "Apply Filter". | Cuisine = Thai, Ingredient = lamb | “No recipes found” message is displayed. | "No recipes found." was displayed. | Pass. |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-04 | Verify ingredient filter handles zero matches | 1\. Search for Thai cuisine.<br>2. Type "lamb" in ingredient filter.<br>3. Click "Apply Filter". | Cuisine = Thai, Ingredient = lamb | “No recipes found” message is displayed. | "No recipes found." was displayed. | Pass. |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|-------------------------------------------------|---------------------------------------------------------------------------------------------------|--------------------------------------------|-----------------------------------------------------------------|----------------|-----------|
| TC-SEARCH-05 | Verify multiple ingredient filtering works | 1. Search for Thai cuisine.<br>2. Enter “chicken, basil”.<br>3. Click “Apply Filter”. | Ingredients = [chicken, basil] | Only recipes containing BOTH chicken and basil are displayed. | Only recipes containing BOTH chicken and basil were displayed. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-05 | Verify multiple ingredient filtering works | 1\. Search for Thai cuisine.<br>2. Enter “chicken, basil”.<br>3. Click “Apply Filter”. | Ingredients = \[chicken, basil\] | Only recipes containing BOTH chicken and basil are displayed. | Only recipes containing BOTH chicken and basil were displayed. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|--------------------------------------------------|----------------------------------------------------------------------------|---------------------|----------------------------------------------------------|----------------|-----------|
| TC-SEARCH-06 | Verify title search returns matching recipes | 1. Go to Search page.<br>2. Enter “Pasta” in the title search bar.<br>3. Click “Search”. | Title = Pasta | Recipes whose titles contain “Pasta” appear in results. | Recipes whose titles contained “Pasta” appeared in results. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-06 | Verify title search returns matching recipes | 1\. Go to Search page.<br>2. Enter “Pasta” in the title search bar.<br>3. Click “Search”. | Title = Pasta | Recipes whose titles contain “Pasta” appear in results. | Recipes whose titles contained “Pasta” appeared in results. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|-------------------------------------------------|----------------------------------------------------------------------------|------------------------|-----------------------------------------------------------|----------------|-----------|
| TC-SEARCH-07 | Verify description keyword matches recipes | 1. Enter “spicy” in description search field.<br>2. Click “Search”. | Description = spicy | Recipes containing “spicy” in the description appear. | Recipes containing “spicy” in the description appear. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-07 | Verify description keyword matches recipes | 1\. Enter “spicy” in description search field.<br>2. Click “Search”. | Description = spicy | Recipes containing “spicy” in the description appear. | Recipes containing “spicy” in the description appear. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|--------------------------------------------|----------------------------------------------------------------------|---------------------------|---------------------------------------------------|----------------|-----------|
| TC-SEARCH-08 | Verify allergy filter excludes nut recipes | 1. Select “Nut-free” allergy filter.<br>2. Click “Search”. | Allergy = Nut-free | No recipes containing nuts are displayed. | Allergen filter feature not working correctly at the moment. It shows all recipes even the one including "nuts." | Fail |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-08 | Verify allergy filter excludes nut recipes | 1\. Select “Nut-free” allergy filter.<br>2. Click “Search”. | Allergy = Nut-free | No recipes containing nuts are displayed. | Allergen filter feature not working correctly at the moment. It shows all recipes even the one including "nuts." | Fail |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|-------------------------------------------------|---------------------------------------------------------------------------------------------------|--------------------------------------------|---------------------------------------------------------|----------------|-----------|
| TC-SEARCH-09 | Verify combined filtering (cuisine + ingredient + allergy) | 1. Select Cuisine = Thai.<br>2. Ingredient = chicken.<br>3. Allude Allergen = gluten.<br> 4. Click “Search”. | Thai, chicken, gluten-free. | Only recipes meeting all selected criteria appear. It shows all recipes even including the ones with "gluten" | Allergen filter feature not working correctly at the moment. | Fail |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-09 | Verify combined filtering (cuisine + ingredient + allergy) | 1\. Select Cuisine = Thai.<br>2. Ingredient = chicken.<br>3. Allude Allergen = gluten.<br>4. Click “Search”. | Thai, chicken, gluten-free. | Only recipes meeting all selected criteria appear. It shows all recipes even including the ones with "gluten" | Allergen filter feature not working correctly at the moment. | Fail |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|------------------------------------|-----------------------------------------------------------------|-----------|-----------------------------------------------------------------------------|----------------|-----------|
| TC-SEARCH-10 | Verify “Clear All Filters” resets search | 1. Apply any filters.<br>2. Click “Clear All Filters”. | N/A | Filters reset and full, unfiltered recipe list is shown. | Filters reset and full, unfiltered recipe list was shown. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-10 | Verify “Clear All Filters” resets search | 1\. Apply any filters.<br>2. Click “Clear All Filters”. | N/A | Filters reset and full, unfiltered recipe list is shown. | Filters reset and full, unfiltered recipe list was shown. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|--------------------------------------------|---------------------------------------------------------------------------------------------|-------------------|-------------------------------------------------------------|-----------------------------------------------|-----------|
| TC-SEARCH-11 | Verify exclude ingredient filter works | 1. Go to Search page.<br>2. Enter "basil" in Exclude Ingredients field.<br>3. Click Search. | Exclude = basil | Only recipes **without basil** appear in the results. | Only recipes without basil appeared. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-11 | Verify exclude ingredient filter works | 1\. Go to Search page.<br>2. Enter "basil" in Exclude Ingredients field.<br>3. Click Search. | Exclude = basil | Only recipes **without basil** appear in the results. | Only recipes without basil appeared. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|----------------|---------------------------------------------------------|---------------------------------------------------------------------------------------------|--------------------------------------|-------------------------------------------------------------------------------|---------------------------------------|-----------|
| TC-SEARCH-12 | Verify include + exclude contradiction returns no results | 1. Go to Search page.<br>2. Enter "basil" in Include field.<br>3. Enter "basil" in Exclude field.<br>4. Click Search. | Include = basil, Exclude = basil | No recipes should appear due to contradictory filter conditions. | No recipes were shown as expected. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-SEARCH-12 | Verify include + exclude contradiction returns no results | 1\. Go to Search page.<br>2. Enter "basil" in Include field.<br>3. Enter "basil" in Exclude field.<br>4. Click Search. | Include = basil, Exclude = basil | No recipes should appear due to contradictory filter conditions. | No recipes were shown as expected. | Pass |
User Story 2: As HomeCookHerin, I want to rate and comment on recipes I have tried so that I can provide feedback to other cooks and mark which recipes I enjoyed.
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|--------------------------------------|------------------------------------------------------------------------------|-----------------------|-------------------------------------------------------------------------------|----------------|-----------|
| TC-RATE-01 | Submit a valid 5-star rating | 1. Open a recipe.<br>2. Select 5 stars.<br> | Rating = 5 | Rating saved; average rating updates; user rating displayed correctly. | Rating saved, average rating updates and user rating displayed correctly. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|--------------------------------------|------------------------------------------------------------------------------------------|-----------------------|-------------------------------------------------------------------------------|----------------|-----------|
| TC-RATE-02 | Update an existing rating | 1. Open recipe previously rated.<br>2. Change from 3 to 4 stars.<br>3. Click submit. | Old=3, New=4 | Rating updates and average rating recalculates correctly. | Rating updates and average rating recalculates correctly. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-RATE-01 | Submit a valid 5-star rating | 1\. Open a recipe.<br>2. Select 5 stars. | Rating = 5 | Rating saved; average rating updates; user rating displayed correctly. | Rating saved, average rating updates and user rating displayed correctly. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|--------------------------------------|-------------------------------------------------------------------|-----------|--------------------------------------------------|----------------|-----------|
| TC-RATE-03 | Rating without logging in | 1. Log out.<br>2. Open recipe.<br>3. Attempt to rate. | N/A | System prompts user to log in before rating. | System prompts user to log in before rating. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-RATE-02 | Update an existing rating | 1\. Open recipe previously rated.<br>2. Change from 3 to 4 stars.<br>3. Click submit. | Old=3, New=4 | Rating updates and average rating recalculates correctly. | Rating updates and average rating recalculates correctly. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|--------------------------------------|--------------------------------------------------------------------------------------------------------|---------------|----------------------------------------------------------------------------------|----------------|-----------|
| TC-RATE-04 | Prevent rating submitted twice | 1. Submit rating once.<br>2. Attempt to submit another rating without refreshing or editing. | Rating = any | System prevents duplicate submission or forces update instead of duplicate. | It forces updates of the ratings | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-RATE-03 | Rating without logging in | 1\. Log out.<br>2. Open recipe.<br>3. Attempt to rate. | N/A | System prompts user to log in before rating. | System prompts user to log in before rating. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|--------------------------------------|------------------------------------------------------------------------------------------------------|-----------------------|---------------------------------------------------|----------------|-----------|
| TC-RATE-05 | Average rating recalculates correctly | 1. A rates 5.<br>2. B rates 3.<br>3. C rates 4.<br>4. Reload page. | Ratings=[5,3,4] | Average rating shown as **4.0**. | Average rating shown as 4.0. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-RATE-04 | Prevent rating submitted twice | 1\. Submit rating once.<br>2. Attempt to submit another rating without refreshing or editing. | Rating = any | System prevents duplicate submission or forces update instead of duplicate. | It forces updates of the ratings | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|---------------------------------|------------------------------------------------------------------------|--------------------------|----------------------------------------------------------------------|----------------|-----------|
| TC-COM-01 | Comment successfully | 1. Scroll to comments.<br>2. Type a comment.<br>3. Click “Post”. | "This was delicious!" | Comment appears with username + timestamp. | Comment appeared with username + timestamp. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-RATE-05 | Average rating recalculates correctly | 1\. A rates 5.<br>2. B rates 3.<br>3. C rates 4.<br>4. Reload page. | Ratings=\[5,3,4\] | Average rating shown as **4.0**. | Average rating shown as 4.0. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|---------------------------------|-------------------------------------------------------------------------------|-----------|---------------------------------------------------|----------------|-----------|
| TC-COM-02 | Empty comment submission | 1. Leave comment box empty.<br>2. Click “Post”. | "" | It doesn't comment. | Nothing comments. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-COM-01 | Comment successfully | 1\. Scroll to comments.<br>2. Type a comment.<br>3. Click “Post”. | "This was delicious!" | Comment appears with username + timestamp. | Comment appeared with username + timestamp. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|---------------------------------|---------------------------------------------------------------------------------------------------------|------------------------------|----------------------------------------------------------------|----------------|-----------|
| TC-COM-03 | Multiple users commenting | 1. User A comments.<br>2. Logout.<br>3. User B logs in and comments. | A:"Good", B:"Great" | Both comments appear with correct usernames and timestamps. | Both comments appeared with correct usernames and timestamps. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-COM-02 | Empty comment submission | 1\. Leave comment box empty.<br>2. Click “Post”. | "" | It doesn't comment. | Nothing comments. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|---------------------------------|-------------------------------------------------------------------|-----------|-------------------------------------------------------------------|----------------|-----------|
| TC-COM-04 | Like a comment | 1. Find existing comment.<br>2. Click “Like”. | Like +1 | Like count increases; like button becomes active/highlighted. | Like button works. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-COM-03 | Multiple users commenting | 1\. User A comments.<br>2. Logout.<br>3. User B logs in and comments. | A:"Good", B:"Great" | Both comments appear with correct usernames and timestamps. | Both comments appeared with correct usernames and timestamps. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---------------|---------------------------------|-------------------------------------------------------------------|------------|---------------------------------------------------------------------|----------------|-----------|
| TC-COM-05 | Dislike a comment | 1. Find existing comment.<br>2. Click “Dislike”. | Dislike+1 | Dislike count increases; dislike button shows active state. | Dislike button works. | Pass |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-COM-04 | Like a comment | 1\. Find existing comment.<br>2. Click “Like”. | Like +1 | Like count increases; like button becomes active/highlighted. | Like button works. | Pass |
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-COM-05 | Dislike a comment | 1\. Find existing comment.<br>2. Click “Dislike”. | Dislike+1 | Dislike count increases; dislike button shows active state. | Dislike button works. | Pass |
## Test Cases - Hiba's User Stories
......@@ -293,41 +290,218 @@ Epic 1: As CourtneyChaosMom, I want to find recipes that use leftover ingredient
### User Story 1: As CourtneyChaosMom, I want to enter leftover ingredients into a search bar so that I can see recipes that use them.
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|-------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-CCM-001 | Search with multiple valid ingredients | 1. Go to search page<br>2. Enter "chicken, rice, broccoli"<br>3. Click Search | chicken, rice, broccoli | Recipes containing ALL three ingredients appear | No results | FAIL |
| TC-CCM-002 | Search with one ingredient | 1. Go to search page<br>2. Enter "rice"<br>3. Click Search | rice | Recipes containing rice appear | Works — finds matches using ILIKE | PASS |
| TC-CCM-003 | Ingredient not found | 1. Enter "quinoa flakes"<br>2. Click Search | quinoa flakes | "No recipes found" message appears | Returns empty recipes: [] | PASS |
| TC-CCM-004 | Search with duplicated ingredients | 1. Enter "rice, rice, rice"<br>2. Click Search | rice, rice, rice | Same result as single "rice"; no duplicates used | Normalized → same query → same result | PASS |
| TC-CCM-005 | Search with extra spaces | 1. Enter " chicken , rice , broccoli "<br>2. Click Search | (with extra spaces) | Recipes containing chicken, rice, and broccoli appear | normalizeWord handles trim → works | PASS |
| TC-CCM-006 | Search with uppercase/lowercase mix | 1. Enter "CHICKEN, Rice, BROCCOLI"<br>2. Click Search | Mixed case | Correct recipes appear | .toLowerCase() + ILIKE makes search case-insensitive | PASS |
| TC-CCM-007 | Search with partial ingredient match | 1. Enter "broc"<br>2. Click Search | broc | Either: No results | Because of %broc%, broccoli matches → returns recipes | FAIL |
| TC-CCM-008 | Search with invalid characters | 1. Enter "rice!!!"<br>2. Click Search | rice!!! | Error message | No sanitizing, treated literally, e.g. rice!!! won't match → 0 results, no error | PASS |
| TC-CCM-009 | Search with empty input | 1. Leave input blank<br>2. Click Search | "" | Prompt user to enter ingredients and show all recipes | q = '' → ILIKE %% → returns ALL recipes | PASS |
| TC-CCM-010 | Search with many ingredients at once | 1. Enter long list: "chicken, rice, cheese, carrots, onion, celery, beans, corn, tomatoes"<br>2. Click Search | 9 ingredients | Recipes requiring all listed ingredients appear | Works as OR search → shows recipes containing any | FAIL |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-CCM-001 | Search with multiple valid ingredients | 1\. Go to search page<br>2. Enter "chicken, rice, broccoli"<br>3. Click Search | chicken, rice, broccoli | Recipes containing ALL three ingredients appear | No results | FAIL |
| TC-CCM-002 | Search with one ingredient | 1\. Go to search page<br>2. Enter "rice"<br>3. Click Search | rice | Recipes containing rice appear | Works — finds matches using ILIKE | PASS |
| TC-CCM-003 | Ingredient not found | 1\. Enter "quinoa flakes"<br>2. Click Search | quinoa flakes | "No recipes found" message appears | Returns empty recipes: \[\] | PASS |
| TC-CCM-004 | Search with duplicated ingredients | 1\. Enter "rice, rice, rice"<br>2. Click Search | rice, rice, rice | Same result as single "rice"; no duplicates used | Normalized → same query → same result | PASS |
| TC-CCM-005 | Search with extra spaces | 1\. Enter " chicken , rice , broccoli "<br>2. Click Search | (with extra spaces) | Recipes containing chicken, rice, and broccoli appear | normalizeWord handles trim → works | PASS |
| TC-CCM-006 | Search with uppercase/lowercase mix | 1\. Enter "CHICKEN, Rice, BROCCOLI"<br>2. Click Search | Mixed case | Correct recipes appear | .toLowerCase() + ILIKE makes search case-insensitive | PASS |
| TC-CCM-007 | Search with partial ingredient match | 1\. Enter "broc"<br>2. Click Search | broc | Either: No results | Because of %broc%, broccoli matches → returns recipes | FAIL |
| TC-CCM-008 | Search with invalid characters | 1\. Enter "rice!!!"<br>2. Click Search | rice!!! | Error message | No sanitizing, treated literally, e.g. rice!!! won't match → 0 results, no error | PASS |
| TC-CCM-009 | Search with empty input | 1\. Leave input blank<br>2. Click Search | "" | Prompt user to enter ingredients and show all recipes | q = '' → ILIKE %% → returns ALL recipes | PASS |
| TC-CCM-010 | Search with many ingredients at once | 1\. Enter long list: "chicken, rice, cheese, carrots, onion, celery, beans, corn, tomatoes"<br>2. Click Search | 9 ingredients | Recipes requiring all listed ingredients appear | Works as OR search → shows recipes containing any | FAIL |
### User Story 2: As CourtneyChaosMom, I want to filter recipes by allergies so that all my children can safely eat the meals.
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|-------------|---------------|------------|-----------|------------------|----------------|-----------|
| TC-CCM-021 | Filter by single allergy (no dairy) | 1. Open Filter<br>2. Select "No Dairy"<br>3. Click Apply | no dairy | Only dairy-free recipes appear | Works if correct check box is chosen | PASS |
| TC-CCM-022 | Filter by multiple allergies | 1. Select "No Dairy" + "No Peanuts"<br>2. Click Search | no dairy, no peanuts | Only recipes meeting both restrictions appear | Works. Adds multiple NOT @> clauses | PASS |
| TC-CCM-023 | Allergy filter with cuisine filters | 1. Select Cuisine = Italian<br>2. Select "No Dairy"<br>3. Click Search | Italian + no dairy | Italian dairy-free recipes appear | Works: LOWER(cuisine)=... AND NOT(allergens @>) | PASS |
| TC-CCM-024 | Allergy filter with ingredient search | 1. Enter ingredient "chicken"<br>2. Select "No Nuts"<br>3. Search | chicken + nut-free | Chicken recipes that are nut-free appear | Works, both rules applied | PASS |
| TC-CCM-025 | Filter with no matching recipes | 1. Type in "Eggs" into excluded ingredients<br>2. Apply | no eggs | "No recipes found" message displayed | Shows message saying no recipes found | PASS |
| TC-CCM-026 | Clear allergy filters | 1. Apply "No Dairy"<br>2. Click "Clear Filters" | click clear filter while filters are applied | All allergy filters removed; full list returns | Works — filter cleared, returns all | PASS |
| TC-CCM-027 | Allergy filter refreshes after page refresh | 1. Apply "No Peanuts"<br>2. Refresh page | no peanuts | Filter remains applied (if system is designed for persistence) | State of filters not stored anywhere, resets | PASS |
| TC-CCM-028 | Invalid allergy selection input | 1. Attempt to enter custom allergen manually | "no mangoes" | No check box to choose | Can not be applied | PASS |
| TC-CCM-029 | Conflicting allergy filters | 1. Select "Only dairy" AND "No dairy" | conflicting filters | Error message | no result / recipe not found | PASS |
| TC-CCM-030 | Display allergy icons on results | 1. Apply "No Nuts"<br>2. Search | no nuts | Each recipe excludes the proper allergens | allergens are only excluded correctly sometimes | FAIL |
<table>
<tr>
<th>Test Case ID</th>
<th>Test Scenario</th>
<th>Test Steps</th>
<th>Test Data</th>
<th>Expected Results</th>
<th>Actual Results</th>
<th>Pass/Fail</th>
</tr>
<tr>
<td>TC-CCM-021</td>
<td>Filter by single allergy (no dairy)</td>
<td>
1\. Open Filter<br>2. Select "No Dairy"<br>3. Click Apply
</td>
<td>no dairy</td>
<td>Only dairy-free recipes appear</td>
<td>Works if correct check box is chosen</td>
<td>PASS</td>
</tr>
<tr>
<td>TC-CCM-022</td>
<td>Filter by multiple allergies</td>
<td>
1\. Select "No Dairy" + "No Peanuts"<br>2. Click Search
</td>
<td>no dairy, no peanuts</td>
<td>Only recipes meeting both restrictions appear</td>
<td>
Works. Adds multiple NOT @\> clauses
</td>
<td>PASS</td>
</tr>
<tr>
<td>TC-CCM-023</td>
<td>Allergy filter with cuisine filters</td>
<td>
1\. Select Cuisine = Italian<br>2. Select "No Dairy"<br>3. Click Search
</td>
<td>Italian + no dairy</td>
<td>Italian dairy-free recipes appear</td>
<td>
Works: LOWER(cuisine)=... AND NOT(allergens @\>)
</td>
<td>PASS</td>
</tr>
<tr>
<td>TC-CCM-024</td>
<td>Allergy filter with ingredient search</td>
<td>
1\. Enter ingredient "chicken"<br>2. Select "No Nuts"<br>3. Search
</td>
<td>chicken + nut-free</td>
<td>Chicken recipes that are nut-free appear</td>
<td>Works, both rules applied</td>
<td>PASS</td>
</tr>
<tr>
<td>TC-CCM-025</td>
<td>Filter with no matching recipes</td>
<td>
1\. Type in "Eggs" into excluded ingredients<br>2. Apply
</td>
<td>no eggs</td>
<td>"No recipes found" message displayed</td>
<td>Shows message saying no recipes found</td>
<td>PASS</td>
</tr>
<tr>
<td>TC-CCM-026</td>
<td>Clear allergy filters</td>
<td>
1\. Apply "No Dairy"<br>2. Click "Clear Filters"
</td>
<td>click clear filter while filters are applied</td>
<td>All allergy filters removed; full list returns</td>
<td>Works — filter cleared, returns all</td>
<td>PASS</td>
</tr>
<tr>
<td>TC-CCM-027</td>
<td>Allergy filter refreshes after page refresh</td>
<td>
1\. Apply "No Peanuts"<br>2. Refresh page
</td>
<td>no peanuts</td>
<td>Filter remains applied (if system is designed for persistence)</td>
<td>State of filters not stored anywhere, resets</td>
<td>PASS</td>
</tr>
<tr>
<td>TC-CCM-028</td>
<td>Invalid allergy selection input</td>
<td>
1\. Attempt to enter custom allergen manually
</td>
<td>"no mangoes"</td>
<td>No check box to choose</td>
<td>Can not be applied</td>
<td>PASS</td>
</tr>
<tr>
<td>TC-CCM-029</td>
<td>Conflicting allergy filters</td>
<td>
1\. Select "Only dairy" AND "No dairy"
</td>
<td>conflicting filters</td>
<td>Error message</td>
<td>no result / recipe not found</td>
<td>PASS</td>
</tr>
<tr>
<td>TC-CCM-030</td>
<td>Display allergy icons on results</td>
<td>
1\. Apply "No Nuts"<br>2. Search
</td>
<td>no nuts</td>
<td>Each recipe excludes the proper allergens</td>
<td>allergens are only excluded correctly sometimes</td>
<td>
FAIL
</td>
</tr>
</table>
## **Testcases-Herin**
### **User Story 1**
As GrandGourmetGary, I want to upload my recipes with a set of instructions, photos, and a description of their uniqueness so that I can share my culinary creations in a clear and engaging way.
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| **TC01 – US1** | Successful recipe upload | 1\. Go to Upload Recipe page → 2. Fill title, description, ingredients, steps → 3. Upload photo → 4. Click Publish | Title: Pizza; Ingredients: red sauce, base, cheese; Steps: add sauce, add cheese, bake; Cuisine: Italian; Photo: gojo.jpg; Description: Italian pizza | Recipe saved and displayed in community list | Recipe saved and displayed in community list | Pass |
| **TC02 – US1** | Missing title | 1\. Leave title blank → 2. Fill other fields → 3. Publish | Title = "" | Submission blocked; error shown | Error message was shown | Pass |
| **TC03 – US1** | Missing steps | 1\. Leave steps blank → 2. Publish | Steps = "" | Submission blocked; error shown | Error message was shown | Pass |
| **TC04 – US1** | Missing photo | 1\. Fill all fields except photo → 2. Publish | Photo = none | Submission blocked; error shown | Error message was shown | Pass |
| **TC05 – US1** | Long title/description | 1\. Enter 500+ characters → 2. Publish | Title & description = 500+ chars | Recipe accepted; long text handled correctly | Long text displayed properly; home shows 2 lines | Pass |
| **TC06 – US1** | Special characters allowed | 1\. Enter ingredients/steps containing @,#,& → 2. Publish | Ingredients: flour, sugar@, cocoa#; Steps: mix&, bake@ | Recipe accepted; special chars handled | Recipe accepted | Pass |
| **TC07 – US1** | Cancel upload | 1\. Enter data → 2. Click Cancel | — | Data discarded; redirect to recipe list | Delete/cancel incomplete on frontend | Fail |
| **TC08 – US1** | Duplicate recipe title | 1\. Publish recipe with existing title | Title = existing recipe | Warning shown; recipe may save | No warning shown; recipe saved | Fail |
| **TC09 – US1** | Upload multiple photos | 1\. Attach multiple images → 2. Publish | Photos: photo1.jpg, photo2.jpg | All photos displayed | All photos were displayed | Pass |
| **TC10 – US1** | Invalid photo file type | 1\. Upload .exe file → 2. Publish | Photo = file.exe | Error message; cannot upload | .exe upload blocked | Pass |
### **User Story - 2**
As GrandGourmetGary, I want to get reviews and ratings on my uploaded recipes so that I can understand what others think and identify areas where I could improve
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| **TC11 – US2** | Submit valid rating | Open recipe → Select 4 stars → Submit | Rating = 4 | Rating updates; average updates | Rating updated | Pass |
| **TC12 – US2** | Update existing rating | Change rating → Submit | Old = 3, New = 5 | Updated rating saved; average recalculated | Rating & avg updated | Pass |
| **TC13 – US2** | Rating without login | Guest user tries to rate | — | Prompt login; rating blocked | Redirected to login | Pass |
| **TC14 – US2** | Submit valid comment | Type comment → Post | "Looks delicious!" | Comment shows w/ username & timestamp | Displayed correctly | Pass |
| **TC15 – US2** | Empty comment | Leave comment blank → Post | Comment="" | Error message; not posted | Blocked + error | Pass |
| **TC16 – US2** | Multiple users commenting | Users A & B comment | A: "Good", B: "Great" | Both comments displayed correctly | Both shown with correct name | Pass |
| **TC17 – US2** | Like a comment | Click Like | Like +1 | Count increments; button highlights | Count increased | Pass |
| **TC18 – US2** | Dislike a comment | Click Dislike | Dislike +1 | Count increments; button highlights | Dislike increased | Pass |
| **TC19 – US2** | Prevent duplicate likes | Like twice | — | Second like ignored | Count did not increase | Pass |
| **TC20 – US2** | Average rating multiple users | Users rate 5, 3, 4 | Ratings=\[5,3,4\] | Avg displayed = 4.0 | Avg = 4.0 | Pass |
### **User Story - 3**
As GrandGourmetGary, I want to see how my recipes are performing compared to other recipes so that I can understand my progress and engagement within the community.
**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).**
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|--------------|---------------|------------|-----------|------------------|----------------|-----------|
| **TC21 – US3** | Leaderboard ordering | Load leaderboard | Scores = \[45,30,25\] | Descending order | Displayed descending | Pass |
| **TC22 – US3** | Highlight user in leaderboard | Locate user → View rank | User score = 45 | Rank displayed | Rank & score shown | Pass |
| **TC23 – US3** | Leaderboard updates after ratings | Submit rating → Refresh | Ratings updated | Reordered leaderboard | Reordered correctly | Pass |
| **TC24 – US3** | Tie scores handling | Load tied scores | Scores=\[5,5,3\] | Consistent ordering | First recipe ranked higher | Pass |
| **TC25 – US3** | Leaderboard empty state | No ratings → Load | Scores = none | Show “No rated recipes yet” | No message shown | Fail |
| **TC26 – US3** | Highlight top 10 chefs | Load leaderboard | Top 10 | Top 10 visually distinct | Top 3 styled differently | Pass |
| **TC27 – US3** | Rank changes after rating update | Update rating → Reload | Old = 3, New = 5 | Rank updates | Rank updated (31% weight) | Pass |
| **TC28 – US3** | Pagination | Load leaderboard with many users | Users \> page limit | Multi-page w/ navigation | No pagination | Fail |
| **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 |
**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_**
_**General**_
1. Does the code work as intended for the feature being reviewed (e.g., search, filters, comments, recipe upload, leaderboard)?
2. Is the code easy to read and understand without relying on external explanations?
3. Does the code follow our team’s conventions (React component naming, consistent indentation, meaningful variable names, clear folder structure)?
......@@ -338,20 +512,23 @@ _**General**_
8. Are loops, array maps, and async workflows properly controlled and guaranteed to terminate?
9. Do variable and function name clearly describe their purpose (e.g., handleLikeClick vs. clickFunction)?
_**Performance**_
**_Performance_**
1. Are there any expensive operations that run more often than necessary (e.g., re-fetches on every render, un-memoized computations)?
2. Can built-in methods (map, reduce, filter) replace custom loops?
3. Are unnecessary console logs or debugging statements left in the code?
4. Are API calls grouped efficiently (e.g., avoiding repeated fetches inside components)?
_**Security**_
**_Security_**
1. Are backend inputs validated (types, required fields, length limits) before being used in queries?
2. Are database queries protected against injection, relying on parameterized queries using pg-pool?
3. Are errors from third-party tools (e.g., file uploads, JWT verification) properly handled?
4. Are invalid parameters (e.g., missing recipeId, invalid rating value) rejected with appropriate error responses?
5. Are password-protected or user-specific routes using authentication middleware (protectRoute) correctly?
_**Documentation**_
**_Documentation_**
1. Do functions or components include meaningful comments when logic is not immediately obvious?
2. Are all API routes documented (purpose, inputs, outputs)?
3. Are unusual behaviors or edge cases (e.g., rating updates, filtering multiple ingredients) explained?
......@@ -359,13 +536,15 @@ _**Documentation**_
5. Are TODOs marked clearly where something is incomplete or will be updated?
6. Are data structures explained (e.g., recipe object, comment schema, ratings table)?
_**Testing**_
**_Testing_**
1. Is the code structured to be testable (clear functions, predictable props, isolated logic)?
2. Can functions be triggered manually for testing (e.g., clean API endpoints, stable UI selectors)?
3. Are input validations testable (empty fields, invalid formats, boundary values)?
4. Could any custom logic be replaced by built-in or existing tested utilities?
_**Code Implementation**_
**_Code Implementation_**
1. Variable and Constant Defects
- Are descriptive variable names used consistently across frontend and backend?
- Are any variables too similar or confusing?
......@@ -385,12 +564,12 @@ _**Code Implementation**_
- Do loops, conditional branches, and async flows always reach proper termination?
- Are switch cases or if-else structures complete and easy to follow?
**Use the checklist to check another team member’s code (you cannot check your own code). Each team member needs to submit a report.**
_**Amna's Report to Hiba**_
**_Amna's Report to Hiba_**
| **Category** | **Inspection Question** | **Answer** |
|--------------|--------------------------|-------------|
|--------------|-------------------------|------------|
| **General** | Does the code work as intended for the feature being reviewed? | Mostly: search works, filtering works, include/exclude behave correctly, but allergen filtering did not work properly when tested last on Saturday, November 15. |
| General | Is the code easy to read and understand? | Yes, the structure and logic are clear. |
| General | Does the code follow team coding conventions? | Yes: consistent naming, formatting, and file structure. |
......@@ -424,7 +603,7 @@ _**Amna's Report to Hiba**_
| Implementation | Are variables/state initialized properly? | Mostly yes: except some missing "placeholderIndex" in "searchRecipes". |
| Implementation | Can non-local variables be moved inside functions? | Already handled cleanly. |
| Implementation | Should literal values be constants? | "limit" and "offset" defaults can be constants. |
| Implementation | Are constants used for reused values? | Repeated values are handled well, and shared logic is already placed in helper functions like "normalizeWord()". No unnecessary hard-coded literals found. | |
| Implementation | Are constants used for reused values? | Repeated values are handled well, and shared logic is already placed in helper functions like "normalizeWord()". No unnecessary hard-coded literals found. |
| Implementation | Are function/handler names descriptive? | Yes. |
| Implementation | Are parameters validated before use? | Some validation, but more could be added. |
| Implementation | Do functions return correct structures/status codes? | Yes: consistent JSON responses, status codes correct. |
......@@ -434,29 +613,29 @@ _**Amna's Report to Hiba**_
| Implementation | Do loops/branches terminate correctly? | Yes. |
| Implementation | Are if-else/switch structures complete and readable? | Yes: readable and consistent. |
**_Herin's Report to Amna_**
_**Herin's Report to Amna**_
| **Category** | **Inspection Question** | **Answer** |
|--------------|--------------------------|-------------|
|--------------|-------------------------|------------|
| **General** | Does the code work as intended for the feature being reviewed? | Yes, comments, ratings, average rating updates, and reactions all work. |
| General | Is the code easy to read and understand? | Yes, the logic is clear and the structure is consistent. |
| General | Does the code follow team coding conventions? | Yes, consistent naming, formatting, and folder structure. |
| General | Any repeated logic that should be moved to shared utilities? | No repeated logic found. |
| General | Is the component or function modular? | Yes, each part performs one responsibility. |
| General | Any unnecessary global variables or shared state? | No. |
| General | Any commented-out code that should be removed? | No. |
| General | Any commented-out code that should be removed? | Yes need to remove some commented code especially in backend |
| General | Are loops/maps/async workflows properly controlled? | Yes. |
| General | Do variable/function names clearly describe their purpose? | Yes — e.g., `handleReaction`, `fetchComments`. |
| **Performance** | Any expensive operations running too often? | No. |
| Performance | Can built-in methods replace custom loops? | Already using built-in methods. |
| Performance | Any unnecessary console logs/debug statements? | Yes — rating stars log errors instead of showing alerts. |
| Performance | Are API calls grouped efficiently? | Yes. |
| **Security** | Are backend inputs validated before queries? | Yes. |
| **Security** | Are backend inputs validated before queries? | Yes mostly but could use more validation like making sure that comments are string. |
| Security | Are database queries protected (parameterized)? | Not fully — needs improvement. |
| Security | Are third-party errors handled properly? | Yes. |
| Security | Are third-party errors handled properly? | Yes. but could have more explanation for some of teh psql usage |
| Security | Are invalid parameters rejected correctly? | Yes, appropriate responses are returned. |
| Security | Is protectRoute used correctly? | Yes. |
| **Documentation** | Are comments meaningful where logic is complex? | Yes. |
| **Documentation** | Are comments meaningful where logic is complex? | Yes, but agin could have a breif explanation for some sql command. |
| Documentation | Are API routes documented? | No — backend needs more documentation. |
| Documentation | Are edge cases explained (rating updates, multi-filters)? | Yes, both frontend and backend. |
| Documentation | Are third-party libraries used clearly? | Yes. |
......@@ -466,23 +645,22 @@ _**Herin's Report to Amna**_
| Testing | Can functions be manually tested (UI/Postman)? | Yes, tested via Postman too. |
| Testing | Are input validations testable? | Yes — backend sends clear error messages. |
| Testing | Could custom logic be replaced with built-ins? | No. |
| **Implementation** | Are variable names descriptive? | Yes. |
| **Implementation** | Are variable names descriptive? | Yes, but some of them could use a different name like all the result for sql are named result but could have a descriptive name/ |
| Implementation | Any confusing or similar variables? | No. |
| Implementation | Are variables/state initialized properly? | Yes. |
| Implementation | Can non-local variables be moved inside functions? | No. |
| Implementation | Should literal values be constants? | Not required here. |
| Implementation | Are constants used for reused values? | Could improve — axios instance could centralize URLs. |
| Implementation | Are function/handler names descriptive? | Yes. |
| Implementation | Are parameters validated before use? | Yes. |
| Implementation | Are parameters validated before use? | Yes, but could also have some more validation in fronted too. |
| Implementation | Do functions return correct structures/status codes? | Yes. |
| Implementation | Any possible overflow/invalid values in calculations? | No. |
| Implementation | Are parenthesis/grouping used properly? | Yes. |
| Implementation | Are async operations handled safely (try/catch)? | Yes, but some missing UI alerts. |
| Implementation | Do loops/branches terminate correctly? | Yes. |
| Implementation | Are if-else/switch structures complete and readable? | Yes, with comments when needed. |
| Implementation | Are if-else/switch structures complete and readable? | Yes, with comments when needed |
_**Hiba's Report to Herin**_
**_Hiba's Report to Herin_**
| Category | Inspection Question | Answer |
|----------|---------------------|--------|
......@@ -529,39 +707,36 @@ _**Hiba's Report to Herin**_
| **Implementation** | Do loops/branches terminate correctly? | Yes |
| **Implementation** | Are if-else/switch structures complete and readable? | Yes |
_**Aron's Report to Hooriya**_
_**Hooriya's Report to Aron**_
**_Aron's Report to Hooriya_**
**_Hooriya's Report to Aron_**
**4. Contributions and Action Plan**
- Provide a list of who did what for this milestone and assign a % for their contribution and who will work on what for the next milestone.
Team Contribution Breakdown
| Member | Work Completed | Contribution % |
| ------ | ------ | ------ |
|--------|----------------|----------------|
| Amna Shakeel | Worked on Deliverable 3: made test cases for my user stories, including search/filtering and commenting and rating. Tested these cases manually. | 20% |
| John Aron Calderon | | 20% |
| Hiba Ajaz | reviewed the Recipe creation/editing/deletion, AI recipe generation, frontend recipe forms, image upload handling, recipe display pages. Wrote tests for teh search and filter user stories. | 20% |
|Herin Patel | | 20% |
| Hooria Fatima |. | 20%
| Herin Patel | reviewed the comment and rating section for Amna .wrote and tested the testcases for 3 of my user stories. | 20% |
| Hooria Fatima | . | 20% |
**Sprint Plan (Next Sprint)**
| Sprint Plan |
| ------ |
| Amna - Implement delete-comment functionality (frontend + backend). Add proper relevant timestamps like "1 hour ago," or "3 days ago." | |
|-------------|
| Amna - Implement delete-comment functionality (frontend + backend). Add proper relevant timestamps like "1 hour ago," or "3 days ago." |
| John Aron - |
| Hiba - fix up exluded allergens to work proper. Add sorting by ratings, title, etc, Combined search + filter logic |
Herin -
| Herin - add update and delete functionality for recipe. Make some UI and code adjustment. |
| Hooria - |
6. Gen AI Statement
Amna's: I used ChatGPT to help format the test cases, clean up wording, and organize sections of this document but all final content reflects my own work and decisions.
Herin's: I used AI to review and help me in formatting my testcases, i also used it to format my suggestion. Wherever I used AI I made sure to review it properly first and tahn add it.
\ No newline at end of file