A Next.js App Router greeting app whose e2e tests run on every pull request
and every push to main. It has three locator tests and two agent tests.

The workflow
.github/workflows/e2e.yml was written by
npx e2e init --ci github-actions. On each run it:
- Installs dependencies with
npm cion Node 24. - Restores Chromium from the cache, or installs it with
npx e2e-web install chromium --with-deps. - Runs
npx e2e run --reporter list,junit. The app starts on its own. - Uploads
.e2e/report.json,.e2e/junit.xml, and.e2e/resultsas thee2e-reportartifact, even when tests fail. The artifact is kept for 7 days.
A new push to a pull request cancels the run still in progress for it.
Agent tests in CI
Add a Vercel AI Gateway key as a
repository secret named AI_GATEWAY_API_KEY (Settings → Secrets and
variables → Actions). Without it, the agent tests skip and the locator tests
still run.
Pull requests from forks don't get repository secrets, so their agent tests skip.
Run locally
Use Node 22.22.3+, 24.8+, or 26+. From this folder:
npm install
AI_GATEWAY_API_KEY="your-key" npm run test:e2eThe runner starts the app at http://localhost:3100 and downloads Chromium on
the first run if needed. Leave out the key to run only the locator tests. Add
-- --no-cache to use fresh model calls. Results are in .e2e/report.json.
See e2e.config.ts and tests/ for the setup. For your own repository, follow the GitHub Actions guide.
Last checked with e2e 0.23.0, @e2e-dev/web 0.15.5, Next.js 16.4, and Node 24.
