Lets the CI preview server stand in for the contact API

With contactForm.enabled=true the e2e and Lighthouse runs asked a token route
that CI does not have (404, console error, run 666). The preview server gets an
opt-in --contact-stub (token 200 without captcha, submit 202); the e2e server
helper and the Lighthouse start command switch it on. Tests that need another
answer still replace it per page with page.route.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 19:39:03 +01:00
co-authored by Claude Sonnet 5.5
parent 7e708cf3c7
commit 7737104a77
5 changed files with 87 additions and 4 deletions
+2
View File
@@ -113,6 +113,8 @@ describe('Lighthouse-configuratie', () => {
it('start de preview met de auditroute en meet een keer', () => {
expect(startCommand).toContain('--audit-route');
// CI heeft geen CMS-host: de preview bootst de contact-API na
expect(startCommand).toContain('--contact-stub');
expect(collect.numberOfRuns).toBe(1);
});