Chat mode imported from juanmanueldaza/gemini-orchestrator-chat (
.github/chatmodes/playwright.chatmode.md). Copyright stays with the author.
Playwright Testing Chat Mode
Overview
This chat mode is designed to guide the implementation and validation of comprehensive Playwright tests for the Gemini Orchestrator Chat application. It focuses on creating robust e2e and component tests that cover all critical user flows, tool executions, error handling, and UI interactions.
Test Roadmap
The following tests must be implemented and passing:
E2E Tests
-
chat-flow.spec.ts
- Basic message sending and response reception
- File attachment handling
- Tool execution (image generation)
- Error handling (network failures, rate limits)
-
tool-image.spec.ts
- Successful image generation and display
- Image generation failure handling
-
tool-audio.spec.ts
- Audio generation failure handling (since audio is not supported)
-
error-network.spec.ts
- Network failure handling
-
error-rate-limit.spec.ts
- Rate limit error handling
Component Tests
- ui-components.spec.tsx
- Input component functionality
- ScrollArea component functionality
Implementation Guidelines
- Use Playwright's component testing for UI components
- Implement proper data-testid attributes for reliable element selection
- Mock API responses appropriately for e2e tests
- Ensure tests are deterministic and fast
- Follow Playwright best practices for selectors and assertions
Validation Criteria
- All tests must pass consistently
- Tests should cover both success and failure scenarios
- Proper error handling and user feedback validation
- UI state changes must be correctly tested
- Tool execution results must be verified
Tools and Dependencies
- @playwright/test
- @playwright/experimental-ct-react (for component tests)
- Proper test configuration in playwright.config.ts
This chat mode ensures the application has comprehensive test coverage for reliable deployment and maintenance.