Description
We need comprehensive end-to-end (E2E) frontend tests to ensure the data donation flows work correctly across different scenarios.
Test Scenarios to Cover
1. Successful Data Donation Flow
- User uploads valid PlayStation data file (.xlsx)
- User navigates through consent → upload → filter → donation
- User can review and delete specific rows from data tables
- User successfully donates data and receives JSON export
- Backend accepts the donation successfully
- User reaches thank you page with submission ID
2. Failed Data Donation Flow (Backend Rejection)
- User completes the frontend flow successfully
- User attempts to donate data
- Backend rejects the donation (server error, validation failure, etc.)
- Application handles backend rejection gracefully
- User receives appropriate error messages about donation failure
- User can retry the donation process
3. Warning Data Donation Flow
- User uploads file with missing/incomplete PlayStation data sheets
- Application displays warning about potentially incorrect file
- User sees detailed information about missing sheets
- User can choose to 'Try Again' or 'Proceed Anyway'
- If proceeding, user can still complete donation with available data
Technical Requirements
Testing Framework
- Consider Cypress, Playwright, or similar E2E testing framework
- Tests should run in CI/CD pipeline
- Tests should be reproducible and reliable
- Ability to mock backend responses for testing failure scenarios
Test Data
- Create sample PlayStation data files for testing:
- Valid complete file
- File with missing sheets (for warning scenario)
- Mock backend responses for success/failure scenarios
- Ensure test data covers all supported data categories
Test Coverage
- All user interactions (file upload, row deletion, navigation)
- Data validation and parsing
- Export functionality and JSON structure
- Backend communication and error handling
- User feedback for backend failures
- Responsive design across different screen sizes
Acceptance Criteria
Priority
High - This will ensure the application works reliably for research participants
Description
We need comprehensive end-to-end (E2E) frontend tests to ensure the data donation flows work correctly across different scenarios.
Test Scenarios to Cover
1. Successful Data Donation Flow
2. Failed Data Donation Flow (Backend Rejection)
3. Warning Data Donation Flow
Technical Requirements
Testing Framework
Test Data
Test Coverage
Acceptance Criteria
Priority
High - This will ensure the application works reliably for research participants