Some checks failed
Chore App Build, Test, and Push Docker Images / build-and-push (push) Failing after 1m44s
- Added E2E test setup in `auth_api.py` with `/e2e-seed` endpoint for database reset and test user creation. - Integrated Playwright for end-to-end testing in the frontend with necessary dependencies in `package.json` and `package-lock.json`. - Created Playwright configuration in `playwright.config.ts` to manage test execution and server setup. - Developed new skills for Playwright best practices, visual regression, smoke test generation, and self-healing tests. - Implemented new test cases for chore creation in `chores-create.smoke.spec.ts` and `chores-create.spec.ts`. - Added page object models for `ChildEditPage` and `LandingPage` to streamline test interactions. - Updated `.gitignore` to exclude Playwright reports and test results. - Enhanced documentation in `copilot-instructions.md` for testing and E2E setup.
61 lines
1.6 KiB
TypeScript
61 lines
1.6 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
export default defineConfig({
|
|
testDir: './tests',
|
|
globalSetup: './tests/global-setup.ts',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 1, // Retries help AI "healer" skills see if a failure is flaky
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: 'html',
|
|
|
|
use: {
|
|
baseURL: 'https://localhost:5173',
|
|
trace: 'retain-on-failure', // AI needs this to "see" why a test failed
|
|
video: 'on-first-retry', // Great for visual debugging
|
|
screenshot: 'only-on-failure',
|
|
ignoreHTTPSErrors: true,
|
|
},
|
|
|
|
/* Configure projects for different environments */
|
|
projects: [
|
|
{
|
|
name: 'smoke',
|
|
testMatch: /.*smoke.spec.ts/,
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
storageState: 'tests/.auth/user.json',
|
|
},
|
|
},
|
|
],
|
|
|
|
/* Run your local dev server before starting tests */
|
|
webServer: [
|
|
{
|
|
command: 'npm run dev',
|
|
url: 'https://localhost:5173',
|
|
reuseExistingServer: !process.env.CI,
|
|
stdout: 'pipe',
|
|
stderr: 'pipe',
|
|
ignoreHTTPSErrors: true,
|
|
},
|
|
{
|
|
command:
|
|
'.venv\\Scripts\\python.exe -m flask run --host=0.0.0.0 --port=5000 --no-debugger --no-reload',
|
|
url: 'http://localhost:5000/version',
|
|
reuseExistingServer: !process.env.CI,
|
|
stdout: 'pipe',
|
|
stderr: 'pipe',
|
|
cwd: '../../backend',
|
|
env: {
|
|
FLASK_APP: 'main.py',
|
|
FLASK_DEBUG: '1',
|
|
DB_ENV: 'e2e',
|
|
DATA_ENV: 'e2e',
|
|
SECRET_KEY: 'dev-secret-key-change-in-production',
|
|
REFRESH_TOKEN_EXPIRY_DAYS: '90',
|
|
},
|
|
},
|
|
],
|
|
})
|