Add testing infrastructure (Vitest + Playwright)#2
Merged
Conversation
Set up complete testing framework for the Cognito project: - Vitest for unit and component testing - React Testing Library integration - Happy DOM environment - Coverage reporting configured - Test setup with @testing-library/jest-dom - Playwright for E2E testing - Desktop Chrome and Mobile Chrome (Pixel 5) configuration - Automatic dev server startup - Screenshot and trace on failure - Initial test coverage: - i18n configuration validation - Translation files structure and key parity tests - E2E tests for locale routing (/en/, /pl/) - Mobile and desktop responsiveness verification - Test scripts added to package.json: - npm test - Run unit tests - npm run test:watch - Watch mode - npm run test:coverage - With coverage - npm run test:e2e - Run E2E tests - npm run test:all - Run all tests - Documentation: - TEST_GUIDE.md with examples and best practices All 18 unit tests passing. Ready for E2E validation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
KoderFPV
added a commit
that referenced
this pull request
Feb 7, 2026
Implement a dedicated productNode to handle product detail queries:
- Support position-based references ("the first one", "#2")
- Support name-based references ("Gaming Laptop Pro X1")
- Add IProductAttribute interface for structured specifications
- Track lastSearchResults in graph state between conversation turns
- Extract specs from description as fallback when attributes missing
Changes:
- domain/product.ts: Add IProductAttribute and attributes field
- agents/graph/state.ts: Add ISearchResult and lastSearchResults
- agents/graph/nodes/productNode.ts: New node for product details
- agents/prompts/productPrompts.ts: LLM prompts for reference extraction
- models/products/productsModel.ts: Add findProductByName function
- Updated routing, translations, and tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
KoderFPV
added a commit
that referenced
this pull request
Feb 7, 2026
Implement a dedicated productNode to handle product detail queries:
- Support position-based references ("the first one", "#2")
- Support name-based references ("Gaming Laptop Pro X1")
- Add IProductAttribute interface for structured specifications
- Track lastSearchResults in graph state between conversation turns
- Extract specs from description as fallback when attributes missing
Changes:
- domain/product.ts: Add IProductAttribute and attributes field
- agents/graph/state.ts: Add ISearchResult and lastSearchResults
- agents/graph/nodes/productNode.ts: New node for product details
- agents/prompts/productPrompts.ts: LLM prompts for reference extraction
- models/products/productsModel.ts: Add findProductByName function
- Updated routing, translations, and tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add complete testing infrastructure with Vitest and Playwright.
npm test,npm run test:e2e,npm run test:allTest Results
🤖 Generated with Claude Code