fix(cv): make initial revision atomic
This commit is contained in:
@@ -236,11 +236,11 @@ test("the dedicated application workspace survives deep links, long data and uns
|
||||
await page.goForward();
|
||||
await expect(page).toHaveURL(new RegExp(`/jobs/${job.id}$`));
|
||||
|
||||
const workspaceNav = page.getByRole("navigation", { name: "Workspace sections" });
|
||||
await workspaceNav.getByRole("button", { name: "Cover Letter", exact: true }).click();
|
||||
const workspaceNav = page.getByRole("tablist", { name: "Workspace sections" });
|
||||
await workspaceNav.getByRole("tab", { name: "Cover Letter", exact: true }).click();
|
||||
await expect(page).toHaveURL(new RegExp(`/jobs/${job.id}\\?section=cover-letter$`));
|
||||
await page.getByLabel("Application answer").fill("A reviewed answer that must not be lost.");
|
||||
await workspaceNav.getByRole("button", { name: "Match", exact: true }).click();
|
||||
await workspaceNav.getByRole("tab", { name: "Analysis", exact: true }).click();
|
||||
await expect(page.getByRole("dialog", { name: "Unsaved application changes" })).toBeVisible();
|
||||
await page.getByRole("button", { name: "Keep editing" }).click();
|
||||
await expect(page.getByLabel("Application answer")).toHaveValue("A reviewed answer that must not be lost.");
|
||||
@@ -268,8 +268,9 @@ test("the dedicated application workspace survives deep links, long data and uns
|
||||
expect(overflow).toBeLessThanOrEqual(1);
|
||||
}
|
||||
|
||||
await workspaceNav.getByRole("button", { name: "Job Details", exact: true }).click();
|
||||
await expect(page).toHaveURL(new RegExp(`/jobs/${job.id}\\?section=job-details$`));
|
||||
await workspaceNav.getByRole("tab", { name: "Overview", exact: true }).click();
|
||||
await expect(page).toHaveURL(new RegExp(`/jobs/${job.id}\\?section=overview$`));
|
||||
await page.getByRole("button", { name: "Job details", exact: true }).click();
|
||||
await expect(page.getByText("Ask about platform ownership and the incident response rotation.")).toBeVisible();
|
||||
await expect(page.getByText("<<<APPLICATION_ANSWER_DRAFT>>>")).toHaveCount(0);
|
||||
|
||||
@@ -315,25 +316,27 @@ test("Career Workspace loads from the authenticated application shell", async ({
|
||||
await expect(page).toHaveURL(/\/career\/builder\/\d+$/);
|
||||
await expect(page.getByLabel("CV name")).toBeVisible();
|
||||
|
||||
await page.getByRole("tab", { name: "Content" }).click();
|
||||
await page.getByRole("button", { name: "Expand Professional Summary" }).click();
|
||||
await page.getByRole("button", { name: "Expand Experience" }).click();
|
||||
await expect(page.getByRole("button", { name: "Collapse Professional Summary" })).toHaveAttribute("aria-expanded", "true");
|
||||
await expect(page.getByRole("button", { name: "Collapse Experience" })).toHaveAttribute("aria-expanded", "true");
|
||||
|
||||
await page.getByLabel("Section type").click();
|
||||
await page.getByRole("option", { name: "Additional Experience" }).click();
|
||||
await page.getByRole("button", { name: "Add section" }).click();
|
||||
await page.getByRole("button", { name: "Add content" }).click();
|
||||
const addContentDialog = page.getByRole("dialog", { name: "Add content" });
|
||||
const additionalExperienceCard = addContentDialog.getByRole("heading", { name: "Additional Experience" }).locator("..");
|
||||
await additionalExperienceCard.getByRole("button", { name: "Add", exact: true }).click();
|
||||
await page.getByRole("button", { name: "Expand Additional Experience" }).click();
|
||||
await page.getByRole("button", { name: "Add entry" }).click();
|
||||
await page.getByRole("textbox", { name: "Entry 1", exact: true }).fill("Maintained a community software project.");
|
||||
|
||||
await page.getByRole("tab", { name: "Template" }).click();
|
||||
await page.getByRole("button").filter({ hasText: /^CodeTechnical/ }).click();
|
||||
await page.getByRole("tab", { name: "Design" }).click();
|
||||
await page.getByRole("tab", { name: "Customize" }).click();
|
||||
await page.getByLabel("Skills presentation").click();
|
||||
await page.getByRole("option", { name: "Bullet list" }).click();
|
||||
await page.locator('input[type="color"]').fill("#126b55");
|
||||
await expect(page.getByRole("tab", { name: "AI" })).toHaveCount(0);
|
||||
await expect(page.getByRole("tab", { name: "AI Tools" })).toBeVisible();
|
||||
|
||||
await page.evaluate(() => window.localStorage.setItem("jobtracker.themeMode", "dark"));
|
||||
await page.reload();
|
||||
|
||||
Reference in New Issue
Block a user