Hero: planning en hero-brede aan/uit verwijderd (hero altijd aan, live zodra er een titel is); migratie, API, admin, tests en docs bijgewerkt

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 08:21:32 +01:00
co-authored by Claude Sonnet 5.5
parent ef62a3714f
commit b78e890f65
29 changed files with 341 additions and 285 deletions
@@ -103,7 +103,7 @@ describe('Hero page', () => {
expect(await screen.findByTestId('hero-form', {}, T)).toBeInTheDocument();
});
it('saves the texts, the buttons and the schedule, and shows the hero as live', async () => {
it('saves the texts and the buttons, and shows the hero as live', async () => {
await openPage();
await userEvent.type(screen.getByTestId('hero-title-input'), 'Websites,{enter}apps{enter}& meer.');
@@ -125,9 +125,6 @@ describe('Hero page', () => {
{ label: 'Bekijk pakketten', target: '#pakketten' },
{ label: 'Plan een gesprek', target: '#contact' },
],
isActive: true,
startsAt: null,
endsAt: null,
slides: [],
});
});
@@ -168,15 +165,12 @@ describe('Hero page', () => {
expect(await screen.findByTestId('hero-button-1-target-error')).toHaveTextContent(/Vul zowel de tekst als het doel|Fill in both the text and the target/);
});
it('wants the end after the start', async () => {
it('has no switch and no schedule: the hero is always on', async () => {
await openPage();
await userEvent.type(screen.getByTestId('hero-title-input'), 'Titel');
fireEvent.change(screen.getByTestId('hero-starts'), { target: { value: '2026-12-10T10:00' } });
fireEvent.change(screen.getByTestId('hero-ends'), { target: { value: '2026-12-01T10:00' } });
await userEvent.click(screen.getByTestId('hero-save'));
expect(await screen.findByTestId('hero-ends-error')).toHaveTextContent(/Het einde moet na het begin liggen\.|The end must be after the start\./);
expect(screen.queryByTestId('hero-active')).not.toBeInTheDocument();
expect(screen.queryByTestId('hero-starts')).not.toBeInTheDocument();
expect(screen.queryByTestId('hero-ends')).not.toBeInTheDocument();
});
});
@@ -650,7 +644,7 @@ describe('Order by dragging, wording and calm waiting', () => {
const help = screen.getByTestId('hero-help');
expect(help).toHaveTextContent(/#contact/);
expect(help).toHaveTextContent(/\/privacy/);
expect(help).toHaveTextContent(/Planning|Schedule/);
expect(help).not.toHaveTextContent(/Planning|Schedule/);
});
it('numbers the slides by their current order, also after the order changed', async () => {