site-builder: ContactForm non-relay output byte-identical (honeypot whitespace fix) + test guard
Fix non-relay form output to match pre-change byte-for-byte by conditionally omitting the honeypot and fields lines when empty. Add backward-compat regex assertion to catch extra blank lines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,5 +20,7 @@ describe('ContactForm.toHtml relay wiring', () => {
|
||||
expect(html).not.toContain('WHP-FORM');
|
||||
expect(html).toContain('action="/legacy"');
|
||||
expect(html).not.toContain('_gotcha');
|
||||
// Backward-compat: ensure non-relay output is byte-identical (no extra blank lines from honeypot)
|
||||
expect(html).not.toMatch(/<form[^>]*>\n\s*\n/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user