Adds the shoot-type pages content and SEO foundation
Five pages under /soorten-fotoshoots/<id> with draft copy awaiting Andrea's approval (DRAFT markers), structured data (Service, BreadcrumbList, FAQPage), sitemap and Lighthouse entries. The overview route moves to soorten-fotoshoots/index.tsx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import newbornPage from '@/content/shootPages/newborn';
|
||||
import shootPageShared from '@/content/shootPageShared';
|
||||
import packages from '@/content/packages';
|
||||
import shootTypes from '@/content/shootTypes';
|
||||
import siteContent from '@/content/siteContent';
|
||||
import { shootPageView } from '@/lib/shootPageView';
|
||||
import { axeResults } from '@/test/axe';
|
||||
import { renderWithProviders } from '@/test/renderWithProviders';
|
||||
import ShootPage from './ShootPage';
|
||||
|
||||
const view = shootPageView('newborn', newbornPage, {
|
||||
shootTypes,
|
||||
packages,
|
||||
shared: shootPageShared,
|
||||
site: siteContent,
|
||||
portfolioShoots: [],
|
||||
});
|
||||
|
||||
describe('ShootPage', () => {
|
||||
it('toont label, de enige h1 en de intro', async () => {
|
||||
if (view === undefined) throw new Error('no view for newborn');
|
||||
const { container } = await renderWithProviders(
|
||||
<ShootPage view={view} />,
|
||||
);
|
||||
expect(screen.getAllByRole('heading', { level: 1 })).toHaveLength(1);
|
||||
expect(screen.getByRole('heading', { level: 1 })).toHaveTextContent(
|
||||
view.intro.title,
|
||||
);
|
||||
expect(screen.getByText(view.intro.eyebrow)).toBeInTheDocument();
|
||||
expect(screen.getByText(view.intro.text)).toBeInTheDocument();
|
||||
expect(await axeResults(container)).toHaveNoViolations();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
import PageIntro from '@/components/PageIntro/PageIntro';
|
||||
import type { ShootPageView } from '@/lib/shootPageView';
|
||||
|
||||
type ShootPageProps = {
|
||||
view: ShootPageView;
|
||||
};
|
||||
|
||||
// One shoot page. For now only the page head with the h1; unit 2 adds the
|
||||
// sections in the order of the page structure.
|
||||
export default function ShootPage({ view }: ShootPageProps) {
|
||||
const { intro } = view;
|
||||
return (
|
||||
<PageIntro eyebrow={intro.eyebrow} title={intro.title}>
|
||||
{intro.text}
|
||||
</PageIntro>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user