Refactor backend project and tighten CV test coverage

This commit is contained in:
2026-04-01 10:42:55 +02:00
parent 44000f96f2
commit 18d1de45cb
9 changed files with 246 additions and 19 deletions
+19
View File
@@ -181,6 +181,25 @@ test('profile page can reprocess from stored artifact history', async () => {
});
});
test('profile page keeps raw extraction collapsed until expanded', async () => {
renderPage();
expect(await screen.findByText(/cv ready/i)).toBeInTheDocument();
expect(screen.getByText(/the structured cv stays front and center/i)).toBeInTheDocument();
const originalExtractionToggle = screen.getByRole('button', { name: /original extraction/i });
expect(originalExtractionToggle).toHaveAttribute('aria-expanded', 'false');
const copyButton = screen.getByRole('button', { name: /copy cv text/i });
expect(copyButton).toBeDisabled();
fireEvent.click(originalExtractionToggle);
expect(originalExtractionToggle).toHaveAttribute('aria-expanded', 'true');
expect(await screen.findByLabelText(/profile cv \/ master resume text/i)).toHaveValue('Professional Summary\nBuilt backend systems');
const copyButtons = screen.getAllByRole('button', { name: /copy cv text/i });
expect(copyButtons.some((button) => !button.hasAttribute('disabled'))).toBe(true);
});
test('saving profile persists structured cv json', async () => {
renderPage();