Completes the front-end shell with footer, status pages and SEO
Adds the footer, back-to-top button, skip link, placeholder routes, 404 and error pages inside the shell, plus per-page SEO from a single page registry (canonical URLs, Open Graph image, JSON-LD, generated sitemap.xml and robots.txt). Theme tokens and recipes replace repeated styling, the hero loads only the active and neighbouring slides, and the e-mail address is joined in the browser to keep it out of the HTML and bundle. Adds Vitest with property-based (fast-check) and axe tests, ESLint, security headers for dev and preview, Lighthouse CI and a `pnpm check` script that runs all quality gates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { footerNav, mainNav } from './navigation';
|
||||
|
||||
describe('menu', () => {
|
||||
it('hoofdmenu heeft de vaste volgorde', () => {
|
||||
expect(mainNav.map((item) => item.label)).toEqual([
|
||||
'Home',
|
||||
'Over mij',
|
||||
'Portfolio',
|
||||
'Soorten fotoshoots',
|
||||
'Contact',
|
||||
]);
|
||||
});
|
||||
|
||||
it('hoofdmenu begint met Home en bevat geen privacyverklaring', () => {
|
||||
expect(mainNav[0].to).toBe('/');
|
||||
expect(mainNav.map((item) => item.to)).not.toContain(
|
||||
'/privacyverklaring',
|
||||
);
|
||||
});
|
||||
|
||||
it('footermenu volgt het design plus de privacyverklaring', () => {
|
||||
expect(footerNav.map((item) => item.to)).toEqual([
|
||||
'/portfolio',
|
||||
'/soorten-fotoshoots',
|
||||
'/contact',
|
||||
'/privacyverklaring',
|
||||
]);
|
||||
});
|
||||
|
||||
it('geen dubbele routes binnen een menu', () => {
|
||||
for (const menu of [mainNav, footerNav]) {
|
||||
const paths = menu.map((item) => item.to);
|
||||
expect(new Set(paths).size).toBe(paths.length);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user