Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.
TypeScript ai-agentai-resume-analyzerapplication-trackerapplication-tracking-systematscareerjob-applicationjob-automationjob-huntingjob-searchjob-seeker-toolsjob-trackerjob-trackingjobsearchjobseekersmcpollamaresumeresume-reviewself-hosted
update button selectors for job actions and add resume skills/certifications tests
Khuram Niazed974df39e1b
diff --git a/e2e/add-job.spec.ts b/e2e/add-job.spec.tsindex 9f93147..0e8ce02 100644--- a/e2e/add-job.spec.ts+++ b/e2e/add-job.spec.ts@@ -207,7 +207,7 @@ test.describe("Add New Job", () => {page,}) => {// No cleanup needed: submission fails validation, so nothing is created.- await page.getByRole("button", { name: "New Job" }).click();+ await page.getByRole("button", { name: "Job", exact: true }).click();await expect(page.getByTestId("add-job-dialog-title")).toBeVisible();await page.getByTestId("save-job-btn").click();diff --git a/e2e/dashboard.spec.ts b/e2e/dashboard.spec.tsindex 13d3556..5ad1dcb 100644--- a/e2e/dashboard.spec.ts+++ b/e2e/dashboard.spec.ts@@ -79,10 +79,10 @@ test.describe("Dashboard page", () => {await navigateToDashboard(page);await expect(- page.getByRole("button", { name: "New Job" }),+ page.getByRole("button", { name: "Job", exact: true }),).toBeVisible();await expect(- page.getByRole("button", { name: "New Task" }),+ page.getByRole("button", { name: "Task", exact: true }),).toBeVisible();await expect(@@ -120,14 +120,14 @@ test.describe("Dashboard page", () => {test("should navigate to create a new job and a new task from dashboard quick actions", async ({page,}) => {- await page.getByRole("button", { name: "New Job" }).click();+ await page.getByRole("button", { name: "Job", exact: true }).click();await expect(page).toHaveURL(/\/dashboard\/myjobs/);await expect(page.getByTestId("add-job-dialog-title")).toBeVisible();await page.getByRole("button", { name: "Cancel" }).click();await expect(page.getByTestId("add-job-dialog-title")).not.toBeVisible();await navigateToDashboard(page);- await page.getByRole("button", { name: "New Task" }).click();+ await page.getByRole("button", { name: "Task", exact: true }).click();await expect(page).toHaveURL(/\/dashboard\/tasks/);});diff --git a/e2e/fixtures.ts b/e2e/fixtures.tsindex a8bd518..6f8cdb6 100644--- a/e2e/fixtures.ts+++ b/e2e/fixtures.ts@@ -60,9 +60,13 @@ export async function createNewJob(const companyText = options?.company ?? `company ${suffix}`;const locationText = options?.location ?? `location ${suffix}`;- await page.getByRole("button", { name: "New Job" }).click();+ // Matches either entry point: the dashboard quick-action card (labeled+ // "Job") when starting from /dashboard, or the myjobs page's own inline+ // trigger (labeled "New Job", from AddJob.tsx) when already on+ // /dashboard/myjobs — createNewJob is called from both contexts.+ await page.getByRole("button", { name: /^(New )?Job$/ }).click();await expect(page).toHaveURL(/\/dashboard\/myjobs/);- // Dashboard's "New Job" button auto-opens the dialog via ?add-job=true.+ // Dashboard's "Job" button auto-opens the dialog via ?add-job=true.await expect(page.getByTestId("add-job-dialog-title")).toBeVisible();if (!options?.skipUrl) {await pagediff --git a/e2e/profile.spec.ts b/e2e/profile.spec.tsindex 165a980..f7b6c69 100644--- a/e2e/profile.spec.ts+++ b/e2e/profile.spec.ts@@ -211,6 +211,70 @@ test.describe("Profile page", () => {page.getByRole("heading", { name: "test school" }).first(),).toBeVisible();});++ test("should add resume skills section", async ({ page, cleanup }) => {+ const resumeTitle = uniqueName("Test Resume");+ const skillText = uniqueName("Skill Test");+ await page.getByRole("link", { name: "Profile" }).click();+ await createResume(page, resumeTitle, cleanup);+ await addSkill(page, resumeTitle, skillText, cleanup);+ await expect(+ page.getByRole("heading", { name: "Core Skills" }),+ ).toBeVisible();+ await expect(page.getByText(skillText, { exact: true })).toBeVisible();+ });++ test("should delete resume skills section", async ({ page, cleanup }) => {+ const resumeTitle = uniqueName("Test Resume");+ const skillText = uniqueName("Skill Test");+ await page.getByRole("link", { name: "Profile" }).click();+ await createResume(page, resumeTitle, cleanup);+ await addSkill(page, resumeTitle, skillText, cleanup);+ await expect(page.getByText(skillText, { exact: true })).toBeVisible();+ await page.getByRole("button", { name: "Delete" }).click();+ await expect(page.getByRole("alertdialog")).toContainText(+ "Delete skills section?",+ );+ await page+ .getByRole("alertdialog")+ .getByRole("button", { name: "Delete" })+ .click();+ await expect(page.getByText(skillText, { exact: true })).not.toBeVisible();+ });++ test("should add resume certification section", async ({+ page,+ cleanup,+ }) => {+ const resumeTitle = uniqueName("Test Resume");+ const certTitle = uniqueName("AWS Certified Solutions Architect");+ await page.getByRole("link", { name: "Profile" }).click();+ await createResume(page, resumeTitle, cleanup);+ await addCertification(page, resumeTitle, certTitle, cleanup);+ await expect(+ page.getByRole("heading", { name: certTitle }).first(),+ ).toBeVisible();+ await expect(page.getByText("Amazon Web Services")).toBeVisible();+ });++ test("should edit resume certification", async ({ page, cleanup }) => {+ const resumeTitle = uniqueName("Test Resume");+ const certTitle = uniqueName("AWS Certified Solutions Architect");+ const editedOrg = uniqueName("Edited Org");+ await page.getByRole("link", { name: "Profile" }).click();+ await createResume(page, resumeTitle, cleanup);+ await addCertification(page, resumeTitle, certTitle, cleanup);+ await expect(+ page.getByRole("heading", { name: certTitle }).first(),+ ).toBeVisible();+ await page.getByRole("button", { name: "Edit" }).click();+ await expect(+ page.getByRole("heading", { name: "Edit Certification / License" }),+ ).toBeVisible();+ await page.getByLabel("Issuing Organization").fill(editedOrg);+ await page.getByRole("button", { name: "Save" }).click();+ await expect(page.getByText(editedOrg)).toBeVisible();+ });});async function addExperience(@@ -261,6 +325,64 @@ async function addExperience(await page.getByRole("button", { name: "Save" }).click();}+async function addSkill(+ page: Page,+ resumeTitle: string,+ skillText: string,+ cleanup: CleanupRegistry,+) {+ await page+ .getByRole("row", { name: new RegExp(resumeTitle, "i") })+ .first()+ .getByTestId("document-actions-menu-btn")+ .click();+ await page.getByRole("link", { name: "View/Edit Resume" }).click();+ await expect(page.getByRole("heading", { name: "Resume" })).toBeVisible();+ await page.getByRole("button", { name: "Add Section" }).click();+ await page.getByRole("menuitem", { name: "Add Skills" }).click();+ await page.getByRole("combobox", { name: "Search or add a skill…" }).click();+ await page.getByPlaceholder("Type a skill...").fill(skillText);+ await page.getByText(`Create "${skillText}"`).click();+ cleanup.tag(skillText);+ await expect(page.getByText(skillText, { exact: true })).toBeVisible();+ await page.getByRole("button", { name: "Save" }).click();+}++async function addCertification(+ page: Page,+ resumeTitle: string,+ certTitle: string,+ cleanup: CleanupRegistry,+) {+ await page+ .getByRole("row", { name: new RegExp(resumeTitle, "i") })+ .first()+ .getByTestId("document-actions-menu-btn")+ .click();+ await page.getByRole("link", { name: "View/Edit Resume" }).click();+ await expect(page.getByRole("heading", { name: "Resume" })).toBeVisible();+ await page.getByRole("button", { name: "Add Section" }).click();+ await page+ .getByRole("menuitem", { name: "Add Certification / License" })+ .click();+ // Wait for the dialog to open+ await page.waitForTimeout(500);+ // Only fill section title if it's visible (when creating new section)+ const sectionTitleField = page.getByPlaceholder("Ex: Certifications");+ if (await sectionTitleField.isVisible()) {+ await sectionTitleField.fill("Certifications");+ }+ await page.getByLabel("Certification / License Name").fill(certTitle);+ await page.getByLabel("Issuing Organization").fill("Amazon Web Services");+ await page.getByLabel("Issue Date").click();+ // Wait for calendar popover to open+ await page.waitForTimeout(1000);+ const issueDateCell = page.getByRole("gridcell", { name: "10" }).first();+ await issueDateCell.waitFor({ state: "visible", timeout: 5000 });+ await issueDateCell.click();+ await page.getByRole("button", { name: "Save" }).click();+}+async function deleteResume(page: Page, title: string) {await page.getByRole("link", { name: "Profile" }).click();await page.waitForLoadState("networkidle");