1 Commits

Author SHA1 Message Date
Estee Tey
9150dd785e
Add Playwright E2E testing framework (#106)
# Add End-to-End Testing with Playwright

This PR adds comprehensive end-to-end testing capabilities using Playwright to ensure the application's core functionality works as expected.

## Key Changes:

- Implemented Playwright for automated browser testing
- Added test scripts for core functionality:
  - QR code creation and customization
  - QR code scanning from file uploads
  - Config saving and loading
  - Batch export functionality
  - Visual regression testing with snapshots

## Testing Details:

- Tests verify that:
  - QR codes can be created with various settings
  - Generated QR codes can be scanned correctly
  - Configuration can be saved and loaded
  - Batch export works with CSV files
  - UI elements behave correctly (disabled/enabled states)

## Development Notes:

- Added `test:e2e` npm script to run the tests
- Updated `.gitignore` to exclude Playwright test results
- Added detailed testing documentation to CONTRIBUTING.md
- Included test fixtures and baseline snapshots for visual regression testing

The tests provide a safety net for future development and help ensure the application remains stable as new features are added.
2025-04-05 21:55:39 +08:00