feat(workspace): refine career workflows

Make job/CV comparisons language-aware and filter recruitment noise. Improve responsive career navigation, shared spacing, dashboard priorities, settings, localized workspace controls, and portable browser tests.
This commit is contained in:
cesnimda
2026-08-29 16:44:44 +02:00
parent 4d4af47651
commit 9edcbfc5de
29 changed files with 827 additions and 236 deletions
@@ -50,11 +50,11 @@ afterEach(() => {
test("first-run workspace presents concise profile, import, general CV and job-specific actions", async () => {
renderOverview();
expect(screen.getByRole("heading", { name: "Career Workspace", level: 1 })).toBeInTheDocument();
expect(screen.getByRole("heading", { name: "Overview", level: 2 })).toBeInTheDocument();
expect(await screen.findByText(/start by adding career information manually or importing a cv/i)).toBeInTheDocument();
expect(screen.queryByText(/job-specific CVs stay separate and never overwrite/i)).not.toBeInTheDocument();
expect(screen.getByRole("link", { name: "Edit career profile" })).toHaveAttribute("href", "#career-profile-editor");
expect(screen.getAllByRole("link", { name: "Import a CV" })[0]).toHaveAttribute("href", "#career-cv-import");
expect(screen.getByRole("link", { name: "Edit career profile" })).toHaveAttribute("href", "/career?section=profile");
expect(screen.getAllByRole("link", { name: "Import a CV" })[0]).toHaveAttribute("href", "/career?section=import");
expect(screen.getByRole("link", { name: "Create a general CV" })).toHaveAttribute("href", "/career/builder");
expect(screen.getByRole("link", { name: "Choose a job" })).toHaveAttribute("href", "/jobs");
expect(await screen.findByText("No CV documents yet.")).toBeInTheDocument();
@@ -64,7 +64,7 @@ test("career workspace overview and import state render in Bokmål", async () =>
window.localStorage.setItem("uiLanguage", "nb");
renderOverview({ runs: [{ id: 7, status: "pending_review" }] });
expect(screen.getByRole("heading", { name: "Karriereområde", level: 1 })).toBeInTheDocument();
expect(screen.getByRole("heading", { name: "Oversikt", level: 2 })).toBeInTheDocument();
expect(screen.getAllByText("Se gjennom importert CV", { selector: "a" })).toHaveLength(2);
expect(screen.getByText("Én import venter på godkjenning.")).toBeInTheDocument();
expect(screen.getByRole("navigation", { name: "Handlinger i karriereområdet" })).toBeInTheDocument();
@@ -94,7 +94,7 @@ test.each([
])("workspace exposes the %s import state as a resumable action", async (status, label, message) => {
renderOverview({ runs: [{ id: 13, status }] });
expect(screen.getAllByRole("link", { name: label })[0]).toHaveAttribute("href", "#career-cv-import");
expect(screen.getAllByRole("link", { name: label })[0]).toHaveAttribute("href", "/career?section=import");
expect(screen.getByText(message)).toBeInTheDocument();
await waitFor(() => expect(mockedList).toHaveBeenCalledTimes(1));
});