Skip to content

BE006: Recommendation Candidate Retrieval Validation and Automated Tests - #198

Open
shshwtsuthar wants to merge 1 commit into
mainfrom
BE006-recommendation-candidate-retrieval
Open

BE006: Recommendation Candidate Retrieval Validation and Automated Tests#198
shshwtsuthar wants to merge 1 commit into
mainfrom
BE006-recommendation-candidate-retrieval

Conversation

@shshwtsuthar

Copy link
Copy Markdown
Collaborator

Ticket

  • BE006

Description

  • Confirms BE005 PR Be005 firebase sq lite sync #27 is merged and records the current Firestore recommendation path.
  • Adds retrieval coverage for missing, empty, broad-only and malformed source categories; category query construction; no matches; duplicate/original exclusion; partial records; and query failure propagation.
  • Applies a test-proven boundary fix: ignore non-string source categories and normalize accepted Firestore records into the existing strict Product contract, including a document-ID barcode fallback.

Validation

  • npx jest __tests__/recommendationCandidateRetrieval.test.ts __tests__/recommendationsAllergenSafety.test.ts __tests__/getProductById.test.ts --runInBand
  • Passed: 3 suites, 33 tests.

Full-suite note

  • npm test -- --runInBand reaches the new candidate suite successfully but has two pre-existing unrelated failures on main: missing @firebase/rules-unit-testing/Node typings in storage.rules.test.ts, and stale shoppingCartApi.test.ts error-envelope assertions. This PR does not touch those files.

Checks

  • All requirements of the ticket have been implemented, or I have commented on any exclusions
  • Unit tests have been added or updated for any backend changes (if applicable)
  • I have reviewed the Files Changed tab and verified it only contains relevant changes
  • This PR has been reviewed and approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant