docs(dev): align setup with current stack

This commit is contained in:
cesnimda
2026-08-30 11:32:00 +02:00
parent 16ef3b9463
commit 2d7a51c3fd
10 changed files with 104 additions and 78 deletions
@@ -239,13 +239,12 @@ test('custom entries can be added, edited, reordered and deleted with confirmati
await waitFor(() => expect(screen.getAllByLabelText(/^Entry /)).toHaveLength(1));
await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
fireEvent.click(screen.getByRole('button', { name: 'Save now' }));
expect(await screen.findByText('Saved')).toBeInTheDocument();
expect(mockedApi.put).toHaveBeenLastCalledWith('/cv/variants/3', expect.objectContaining({
await waitFor(() => expect(mockedApi.put).toHaveBeenLastCalledWith('/cv/variants/3', expect.objectContaining({
settings: expect.objectContaining({
customSections: [expect.objectContaining({ title: 'Selected projects', items: ['First project'] })],
}),
}));
})), { timeout: 5000 });
expect(await screen.findByText('Saved')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: 'Remove Selected projects section from this CV' }));
dialog = await screen.findByRole('dialog', { name: 'Delete custom section' });
@@ -279,15 +278,13 @@ test('profile-backed sections expand, reorder, hide and persist variant-only ove
fireEvent.click(screen.getByRole('button', { name: 'Move Engineer entry down' }));
fireEvent.click(screen.getByRole('button', { name: 'Hide Lead entry' }));
fireEvent.click(screen.getByRole('button', { name: 'Move Experience section down' }));
fireEvent.click(screen.getByRole('button', { name: 'Save now' }));
expect(await screen.findByText('Saved')).toBeInTheDocument();
expect(mockedApi.put).toHaveBeenLastCalledWith('/cv/variants/3', expect.objectContaining({
await waitFor(() => expect(mockedApi.put).toHaveBeenLastCalledWith('/cv/variants/3', expect.objectContaining({
settings: expect.objectContaining({
sections: expect.arrayContaining([expect.objectContaining({ key: 'experience', itemOrder: ['job-2', 'job-1'], presentation: 'grid', columns: 2 })]),
overrides: expect.objectContaining({ 'job-2': expect.objectContaining({ hidden: true }) }),
}),
}));
})), { timeout: 5000 });
expect(await screen.findByText('Saved')).toBeInTheDocument();
});
test('preview failure is visible and retryable without leaving the editor', async () => {