test(cv): select explicit profile content in legacy smoke flows

This commit is contained in:
cesnimda
2026-10-29 08:40:23 +01:00
parent 5add159156
commit 268559f4ae
2 changed files with 35 additions and 4 deletions
@@ -0,0 +1,17 @@
# Smoke-fixture compatibility recovery
29 October 2026. Test-only checkpoint; product source and the compiled application are unchanged.
The frozen `integration-04/` run at `5add159` completed ordinary groups of 102 and 88 passes, then 93 passes/two failures in the 95-case third group. Both before/after source and runtime hashes remained identical. The failures were in `smoke.spec.ts`: a UI-created CV was assumed to inherit sections automatically, and an Additional Experience heading matched both the existing profile section and a custom-section preset. The first assumption conflicts with A's deliberately blank default; the second selector did not identify which card it intended.
The fixture now seeds explicit synthetic summary/experience data and deliberately chooses From Career Profile plus those two checkboxes. It additionally verifies the persisted explicit section keys. The custom preset is identified by its exact description, retaining the existing heading, keyboard, export, content, geometry and focus assertions. No application code, golden file, timeout or test was removed or weakened.
Evidence under `.artifacts/pre-phase10-ux/`:
- `integration-04/{process.json,source-before.json,source-after.json,runtime-before.json,runtime-after.json}` and `ordinary-4.json`: original failed attempt preserved with unchanged source/runtime.
- `smoke-compatibility-01.json`: eight passed/one fixture-label failure; the creation checkbox uses Professional Experience, while the editor disclosure uses Experience. The exact creation label was corrected.
- `smoke-compatibility-02.json`: all nine smoke cases passed, zero failed/skipped/retried, including both original failures and the complete long searchable Code PDF test.
- `smoke-compatibility-{typecheck,lint}.log`: exit zero.
- Follow-up frontend review: no application changes or weakened assertions found; the explicit source seed and saved-key checks strengthen independence.
The remaining ordinary group and specialized configurations are still required. Final reconciliation must prove that this is the sole test-source difference, application/runtime bytes remain unchanged, recovered identities match exactly and all 380 discovered ordinary cases have one qualified passing result. Focused smoke reruns must not inflate that total. Original failures remain evidence; this checkpoint is not a claim that the interrupted full run passed.
+18 -4
View File
@@ -331,6 +331,11 @@ test("the dedicated application workspace survives deep links, long data and uns
test("Career Workspace loads from the authenticated application shell", async ({ page }) => { test("Career Workspace loads from the authenticated application shell", async ({ page }) => {
await login(page); await login(page);
const headers = await csrfHeader(page);
const source = await (await page.request.get(`${apiUrl}/career/profile`)).json();
expect((await page.request.put(`${apiUrl}/career/profile`, { headers, data: { expectedVersion: source.revision,
profile: { version: "1", contact: { fullName: "Fictional Career Workspace Candidate" }, summary: ["Synthetic professional summary."],
jobs: [{ title: "Engineer", company: "Fictional workspace company", bullets: ["Maintained a synthetic software service."] }] } } })).status()).toBe(200);
await page.evaluate(() => window.localStorage.setItem("jobtracker.themeMode", "light")); await page.evaluate(() => window.localStorage.setItem("jobtracker.themeMode", "light"));
await page.goto("/career"); await page.goto("/career");
await expect(page.getByRole("heading", { name: "Career Workspace" })).toBeVisible(); await expect(page.getByRole("heading", { name: "Career Workspace" })).toBeVisible();
@@ -359,8 +364,16 @@ test("Career Workspace loads from the authenticated application shell", async ({
await page.getByRole("link", { name: "Open CV Builder" }).click(); await page.getByRole("link", { name: "Open CV Builder" }).click();
await expect(page).toHaveURL(/\/career\/builder$/); await expect(page).toHaveURL(/\/career\/builder$/);
await page.getByRole("button", { name: "New CV" }).first().click(); await page.getByRole("button", { name: "New CV" }).first().click();
await expect(page.getByRole("dialog", { name: "Create a CV" })).toBeVisible(); const createDialog = page.getByRole("dialog", { name: "Create a CV" });
await page.getByRole("button", { name: "Create CV" }).click(); await expect(createDialog).toBeVisible();
await createDialog.getByRole("radio", { name: "From Career Profile", exact: true }).check();
await createDialog.getByRole("checkbox", { name: "Professional Summary", exact: true }).check();
await createDialog.getByRole("checkbox", { name: "Professional Experience", exact: true }).check();
const createdResponse = page.waitForResponse(response => response.url() === `${apiUrl}/cv/variants` && response.request().method() === "POST");
await createDialog.getByRole("button", { name: "Create CV" }).click();
const created = await (await createdResponse).json();
expect(created.settings.sectionsExplicit).toBe(true);
expect(created.settings.sections.map((section: { key: string }) => section.key)).toEqual(["summary", "experience"]);
await expect(page).toHaveURL(/\/career\/builder\/\d+$/); await expect(page).toHaveURL(/\/career\/builder\/\d+$/);
await expect(page.getByLabel("CV name")).toBeVisible(); await expect(page.getByLabel("CV name")).toBeVisible();
@@ -372,7 +385,7 @@ test("Career Workspace loads from the authenticated application shell", async ({
await page.getByRole("button", { name: "Add content" }).click(); await page.getByRole("button", { name: "Add content" }).click();
const addContentDialog = page.getByRole("dialog", { name: "Add content" }); const addContentDialog = page.getByRole("dialog", { name: "Add content" });
const additionalExperienceCard = addContentDialog.getByRole("heading", { name: "Additional Experience" }).locator(".."); const additionalExperienceCard = addContentDialog.getByText("Add a structured Additional Experience section with reorderable entries.", { exact: true }).locator("..");
await additionalExperienceCard.getByRole("button", { name: "Add", exact: true }).click(); await additionalExperienceCard.getByRole("button", { name: "Add", exact: true }).click();
await page.getByRole("button", { name: "Expand Additional Experience" }).click(); await page.getByRole("button", { name: "Expand Additional Experience" }).click();
await page.getByRole("button", { name: "Add entry" }).click(); await page.getByRole("button", { name: "Add entry" }).click();
@@ -546,7 +559,8 @@ test("the Code template exports a long structured CV as searchable multi-page PD
await addContentButton.click(); await addContentButton.click();
const addContentDialog = page.getByRole("dialog", { name: "Add content" }); const addContentDialog = page.getByRole("dialog", { name: "Add content" });
await expect(addContentDialog).toBeVisible(); await expect(addContentDialog).toBeVisible();
await expect(addContentDialog.getByRole("heading", { name: "Additional Experience" })).toBeVisible(); const customExperienceCard = addContentDialog.getByText("Add a structured Additional Experience section with reorderable entries.", { exact: true }).locator("..");
await expect(customExperienceCard.getByRole("heading", { name: "Additional Experience", exact: true })).toBeVisible();
await addContentDialog.getByRole("button", { name: "Cancel" }).click(); await addContentDialog.getByRole("button", { name: "Cancel" }).click();
await expect(addContentDialog).toBeHidden(); await expect(addContentDialog).toBeHidden();
await expect(addContentButton).toBeFocused(); await expect(addContentButton).toBeFocused();