Summary
Initialize a robust E2E testing framework using Playwright to validate the Freeshard UI and the orchestration of third-party apps. This setup must be suitable for both local development and CI/CD pipelines.
Technical Context
- Base Directory: Create a new top-level directory tests/e2e/ in the freeshard repository.
- Language: TypeScript.
- Framework: Playwright Test (@playwright/test).
Implementation Details for the Agent
- Dependency Setup:
- Create tests/e2e/package.json with @playwright/test and typescript.
- Add scripts: test:e2e, test:e2e:ui, test:e2e:debug.
- Configuration (playwright.config.ts):
- Base URL should be configurable via PORTAL_DOMAIN env (default to http://localhost).
- Setup projects for Chromium, Firefox, and Webkit.
- Configure webServer to optionally start the local stack if it is not running (reference docker-compose.yml).
- Authentication Strategy:
- Implement a setup/auth.setup.ts to handle the login flow once and save the storage state to tests/e2e/.auth/user.json.
- All subsequent tests should use this storage state to bypass login.
- **Directory Structure:
tests/e2e/
├── playwright.config.ts
├── package.json
├── .auth/ # Gitignored
├── setup/
│ └── auth.setup.ts # Global login logic
├── tests/
│ └── smoke.spec.ts # Initial connectivity check
└── utils/
└── shard-api.ts # Helpers to interact with shard_core API
Acceptance Criteria
Summary
Initialize a robust E2E testing framework using Playwright to validate the Freeshard UI and the orchestration of third-party apps. This setup must be suitable for both local development and CI/CD pipelines.
Technical Context
Implementation Details for the Agent
tests/e2e/
├── playwright.config.ts
├── package.json
├── .auth/ # Gitignored
├── setup/
│ └── auth.setup.ts # Global login logic
├── tests/
│ └── smoke.spec.ts # Initial connectivity check
└── utils/
└── shard-api.ts # Helpers to interact with shard_core API
Acceptance Criteria