- Add detailed header documentation to playwright tests
- Document test categories and flows
- Add key selector documentation
- Document state verification and alert handling
- Include code examples and usage patterns
- Add important checks and requirements
The documentation helps developers understand the foundational tests that verify
basic application functionality before running more complex test suites.
Enhances test debugging capabilities by adding:
- Structured logging with timestamps and categories (INFO/STEP/SUCCESS/WAIT)
- Systematic screenshot capture at key test steps
- Comprehensive file documentation headers
- Improved error handling with visual state capture
- Organized test step numbering and progress tracking
Key improvements:
- Added screenshot helper function with consistent naming
- Ensured test-results directory exists before captures
- Replaced console.log with structured logging utility
- Added try-catch blocks with failure state capture
- Improved debugging info for gift button not found error
Tests affected:
- 35-record-gift-from-image-share.spec.ts
- 40-add-contact.spec.ts
Note: Screenshots are stored in test-results/ with test-specific prefixes
- Add better error handling and logging for gift recording flow
- Add explicit navigation to contacts page before finding gift button
- Add info icon click handling when needed
- Add more comprehensive button detection with multiple selectors
- Add debug logging for page state and navigation
- Add screenshot capture on failures
- Add retry logic with proper state verification
- Fix linter errors in playwright config
The changes help diagnose and handle various UI states that can occur during gift recording, making the tests more reliable especially on Linux.