SIGN IN SIGN UP
payloadcms / payload UNCLAIMED

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.

0 0 1 TypeScript

chore: make test:e2e agent-friendly with --grep support and dev server reuse (#15755)

AI agents consistently struggle with two aspects of the e2e test
workflow:

1. **`--grep` not supported by `test:e2e`** - Agents default to passing
`--grep` to `pnpm test:e2e` even when instructed to invoke Playwright
directly. Rather than fighting this, just support it.

2. **Duplicate dev servers** - Agents frequently run `test:e2e` multiple
times without stopping previous dev servers, leading to port conflicts,
stalled processes, and minutes of wasted time before they realize the
server never started. They are **not** smart enough to make sure to
reliably close old dev servers themselves.

### Changes

- Forward the `--grep` flag from `test:e2e` to the underlying Playwright
command
- Before spawning a new dev server, check if port 3000 is already in use
- if so, skip spawning and reuse the existing server
A
Alessio Gravili committed
929203cc064e05338c3dd4951a1b01889d0cc64d
Parent: 8791a72
Committed by GitHub <noreply@github.com> on 2/25/2026, 12:38:02 AM