Stabilize e2e suite: rate-limit, spec drift, a11y, visual baselines #1

Merged
jennie merged 5 commits from fix/e2e-stabilization-2026-04-26 into main 2026-04-26 19:16:22 +00:00
Showing only changes of commit 3f42307c64 - Show all commits

View file

@ -43,6 +43,11 @@ export default defineEventHandler(async (event) => {
const path = getRequestURL(event).pathname const path = getRequestURL(event).pathname
if (!path.startsWith('/api/')) return if (!path.startsWith('/api/')) return
// Bypass rate limiting in test/dev opt-in mode so parallel E2E runs from a
// single IP (127.0.0.1) do not exhaust the per-IP budget. Mirrors the gate
// used by /api/dev/* endpoints — only set in development and by Playwright.
if (process.env.ALLOW_DEV_TEST_ENDPOINTS === 'true') return
const ip = getClientIp(event) const ip = getClientIp(event)
try { try {