Skip to content

Add testing infrastructure (Vitest + Playwright)#2

Merged
KoderFPV merged 1 commit intomainfrom
feature/testing-infrastructure
Nov 1, 2025
Merged

Add testing infrastructure (Vitest + Playwright)#2
KoderFPV merged 1 commit intomainfrom
feature/testing-infrastructure

Conversation

@KoderFPV
Copy link
Owner

@KoderFPV KoderFPV commented Nov 1, 2025

Summary

Add complete testing infrastructure with Vitest and Playwright.

  • Vitest - unit/component tests with React Testing Library
  • Playwright - E2E tests (Desktop + Mobile Chrome)
  • Initial tests - i18n config, translations, locale routing
  • Test scripts - npm test, npm run test:e2e, npm run test:all
  • Documentation - TEST_GUIDE.md

Test Results

✓ i18n/config.test.ts (5 tests)
✓ messages/translations.test.ts (13 tests)

Test Files  2 passed (2)
Tests       18 passed (18)

🤖 Generated with Claude Code

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 KoderFPV merged commit 74f38a6 into main Nov 1, 2025
1 check passed
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>
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