Background
The Private Mirrors App is a Next.js-based application with a web UI that manages the lifecycle of private mirrors and synchronization between public forks and private repositories. Automated UI tests will ensure the functionality of the app. The tests should run against a mock GitHub setup to simplify and speed up the tests and allow them to run locally.
Goal
Implement automated UI testing using Playwright to test the Private Mirrors application UI. These tests should:
- Run against a mock, offline GitHub setup to validate UI functionality without requiring live GitHub API calls
- Be executable locally for development and debugging
- Be integrated into a new GitHub Actions workflow for continuous testing on pull requests and merges
- Provide reliable and maintainable test coverage for critical user workflows
Scope
Tests to implement:
Mock GitHub Setup:
Local Development:
GitHub Actions Integration:
Technical Details
Technology Stack:
- Test Framework: Playwright
- Test Runner: Playwright's built-in runner (or Jest with Playwright preset if preferred)
- Mock API: Consider Mock Service Worker (MSW) or custom mock server
- Reporting: Playwright HTML report generation
Existing Project Context:
- The project already uses Jest for testing (see
jest.config.js)
- Next.js application running on port 3000
- Uses environment variables (
.env.example exists for configuration)
- Already has GitHub Actions workflows for CodeQL, Linting, Docker Build, and Tests
Acceptance Criteria
Implementation Notes
- Start with a small set of critical user workflows to establish the testing pattern
- Ensure mock setup is flexible enough to support future test additions
- Consider test parallelization for faster CI runs
- Make sure tests don't interfere with each other or require specific ordering
References
Background
The Private Mirrors App is a Next.js-based application with a web UI that manages the lifecycle of private mirrors and synchronization between public forks and private repositories. Automated UI tests will ensure the functionality of the app. The tests should run against a mock GitHub setup to simplify and speed up the tests and allow them to run locally.
Goal
Implement automated UI testing using Playwright to test the Private Mirrors application UI. These tests should:
Scope
Tests to implement:
Mock GitHub Setup:
Local Development:
GitHub Actions Integration:
.github/workflows/ui-tests.ymlworkflowTechnical Details
Technology Stack:
Existing Project Context:
jest.config.js).env.exampleexists for configuration)Acceptance Criteria
package.jsonnpm run test:uior similar command/docs/developing.mdwith test execution instructionsImplementation Notes
References
jest.config.jsandbabel.config.testing.js