fix: enforce headless mode for E2E tests in agent skills (#526)

This commit is contained in:
Carlos Florêncio
2026-04-02 00:08:55 +01:00
committed by GitHub
parent dbe778e4e8
commit 16834d007c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -42,10 +42,10 @@ Each worker gets an isolated backend, frontend, database, and mock agent — no
## Run commands
**Always run headless** (`make test-e2e`). Never use `--headed`, `e2e:headed`, or `test-e2e-headed` — headed mode requires a display and will fail in agent environments.
```bash
make test-e2e # all tests, headless
make test-e2e-headed # with visible browser
make test-e2e-ui # Playwright UI mode
cd apps && pnpm --filter @kandev/web e2e -- tests/task/my-test.spec.ts # single file
cd apps && pnpm --filter @kandev/web e2e -- --grep "task creation" # by name
```
+1 -1
View File
@@ -35,7 +35,7 @@ Mark task 1 as in_progress.
Before anything else, reproduce the bug reliably. Pick the right method based on where the bug lives:
- **Backend** (API, logic, data): write a Go test that calls the function/endpoint and asserts the wrong behavior. Run with `go test -v -run TestName ./path/...`
- **Frontend** (UI, state, interaction): write a Playwright E2E test using `/e2e` that navigates to the page and triggers the bug. Run with `make test-e2e-headed` to see it visually.
- **Frontend** (UI, state, interaction): write a Playwright E2E test using `/e2e` that navigates to the page and triggers the bug. Run with `make test-e2e` to verify.
- **Full-stack** (user flow breaks end-to-end): Playwright E2E test that exercises the full path from UI through API to DB and back.
- **Unclear where it lives**: start by reading the code path from the reported symptom (a page, an error message, a wrong value) back to its source. Then write the test at the appropriate level.