Makes the first render match the prerendered HTML

Search values, the 404 buttons and the footer year now apply after hydration.
The e-mail address stays out of the HTML behind a placeholder, and all review
texts are in the page, so crawlers can read them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 18:17:26 +01:00
co-authored by Claude Opus 5.5
parent 1574726c1d
commit 2c2e27e337
32 changed files with 1322 additions and 148 deletions
@@ -5,6 +5,7 @@ import packages from '@/content/packages';
import siteContent from '@/content/siteContent';
import { shootOptions } from '@/lib/shootOptions';
import { axeResults } from '@/test/axe';
import { serverHtml } from '@/test/hydrate';
import { renderWithProviders } from '@/test/renderWithProviders';
import ContactForm from './ContactForm';
@@ -234,3 +235,21 @@ describe('ContactForm', () => {
expect(container.querySelector('[data-robot-check]')).not.toBeNull();
});
});
describe('ContactForm in the prerendered HTML', () => {
it('does not hold the address (BR-MAIL-06)', async () => {
const html = await serverHtml(
<ContactForm
idPrefix="test"
options={options}
mailSubject="Vraag via andreaslop.nl"
email={siteContent.email}
replyTime="1-2 werkdagen"
submit={vi.fn()}
/>,
);
expect(html).toContain('contact-form-submit');
expect(html.toLowerCase()).not.toContain('info@andreaslop.nl');
expect(html).not.toContain('mailto:');
});
});