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
add resume tests
Khuram Niazd19c61377dad
diff --git a/e2e/add-job.spec.ts b/e2e/add-job.spec.tsindex 19cf0a2..e3896af 100644--- a/e2e/add-job.spec.ts+++ b/e2e/add-job.spec.ts@@ -67,9 +67,6 @@ test.describe("Add New Job", () => {await page.getByLabel("Job Source").click();await page.getByRole("option", { name: "Indeed" }).click();await expect(page.getByLabel("Job Source")).toContainText("Indeed");- await page.getByLabel("Due Date").click();- await page.getByRole("gridcell", { name: "25" }).click();- await expect(page.getByLabel("Due Date")).toContainText("Jul 25, 2024");await page.getByLabel("Job Description").locator("div").click();await page.getByLabel("Job Description")@@ -77,14 +74,14 @@ test.describe("Add New Job", () => {.fill("test description");await page.getByTestId("save-job-btn").click();await expect(- page.getByRole("cell", { name: jobText, exact: true }).first()+ page.getByRole("cell", { name: jobText, exact: true })).toBeVisible();});test("should edit the job created", async ({ page }) => {await page.goto("http://localhost:3000/dashboard/myjobs");await expect(- page.getByRole("cell", { name: jobText, exact: true }).first()+ page.getByRole("cell", { name: jobText, exact: true })).toBeVisible();await page.getByRole("row", { name: jobText })@@ -103,7 +100,6 @@ test.describe("Add New Job", () => {);await expect(page.getByLabel("Job Source")).toContainText("Indeed");await expect(page.getByLabel("Select Job Status")).toContainText("Draft");- await expect(page.getByLabel("Due Date")).toContainText("Jul 25, 2024");await expect(page.getByRole("paragraph")).toContainText("test description");await page.getByText("test description").click();await page@@ -117,7 +113,7 @@ test.describe("Add New Job", () => {test("should delete the job created", async ({ page }) => {await page.goto("http://localhost:3000/dashboard/myjobs");await expect(- page.getByRole("cell", { name: jobText, exact: true }).first()+ page.getByRole("cell", { name: jobText, exact: true })).toBeVisible();await page.getByRole("row", { name: jobText })diff --git a/e2e/profile.spec.ts b/e2e/profile.spec.tsindex e6c78b7..de7256d 100644--- a/e2e/profile.spec.ts+++ b/e2e/profile.spec.ts@@ -12,33 +12,205 @@ test.beforeEach(async ({ page }) => {});test.describe("Profile page", () => {+ const resumeTitle = "Test Resume 1";+ const editedTitle = "Test Resume 1 edited";test("should create a new resume", async ({ page }) => {await page.getByRole("link", { name: "Profile" }).click();await page.getByRole("button", { name: "Create Resume" }).click();- await page- .getByPlaceholder("Ex: Full Stack Developer")- .fill("Test Resume 1");+ await page.getByPlaceholder("Ex: Full Stack Developer").fill(resumeTitle);await page.getByRole("button", { name: "Save" }).click();await expect(page.getByRole("status")).toHaveText(/Resume title has been created/);- await expect(page.locator("tbody")).toContainText("Test Resume 1");+ await expect(page.locator("tbody")).toContainText(resumeTitle);});test("should edit the resume title", async ({ page }) => {await page.getByRole("link", { name: "Profile" }).click();await page.getByTestId("resume-actions-menu-btn").first().click();await page.getByRole("menuitem", { name: "Edit Resume Title" }).click();- await page- .getByPlaceholder("Ex: Full Stack Developer")- .fill("Test Resume 1 edited");+ await page.getByPlaceholder("Ex: Full Stack Developer").fill(editedTitle);await page.getByRole("button", { name: "Save" }).click();await expect(page.getByRole("status")).toHaveText(/Resume title has been updated/);- await expect(page.locator("tbody")).toContainText("Test Resume 1 edited");+ await expect(page.locator("tbody")).toContainText(editedTitle);+ });+ test("should add resume contact info", async ({ page }) => {+ await page.getByRole("link", { name: "Profile" }).click();+ await page+ .getByRole("row", { name: editedTitle })+ .getByTestId("resume-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 Contact Info" }).click();+ await page.getByLabel("First Name").fill("John");+ await page.getByLabel("First Name").press("Tab");+ await page.getByLabel("Last Name").fill("Doe");+ await page.getByLabel("Last Name").press("Tab");+ await page+ .getByLabel("Headline")+ .fill("Skill developer with testing skills");+ await page.getByLabel("Headline").press("Tab");+ await page.getByLabel("Email").fill("[email protected]");+ await page.getByLabel("Email").press("Tab");+ await page.getByLabel("Phone").fill("123456789");+ await page.getByLabel("Phone").press("Tab");+ await page.getByLabel("Address").fill("Calgary");+ await page.getByRole("button", { name: "Save" }).click();+ await expect(page.getByRole("status").first()).toContainText(+ /Contact Info has been created/+ );+ await expect(page.getByRole("heading", { name: "John Doe" })).toBeVisible();+ });++ test("should add resume summary section", async ({ page }) => {+ await page.getByRole("link", { name: "Profile" }).click();+ await page+ .getByRole("row", { name: editedTitle })+ .getByTestId("resume-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 Summary" }).click();+ await page.getByLabel("Section Title").fill("Summary");+ await page.locator(".tiptap").click();+ await page.locator(".tiptap").fill("this is test summary\n");+ await page.getByRole("button", { name: "Save" }).click();+ await expect(page.getByRole("heading", { name: "Summary" })).toBeVisible();+ await expect(page.getByText("this is test summary")).toBeVisible();+ await expect(page.getByRole("status").first()).toContainText(+ /Summary has been created/+ );+ });++ test("should add resume work experience section", async ({ page }) => {+ const jobText = "Software Developer";+ await page.getByRole("link", { name: "Profile" }).click();+ await page+ .getByRole("row", { name: editedTitle })+ .getByTestId("resume-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 Experience" }).click();+ await page.getByPlaceholder("Ex: Experience").fill("Experience");+ await page.getByPlaceholder("Ex: Experience").press("Tab");+ await page.getByLabel("Job Title").click();+ await page.getByPlaceholder("Create or Search title").click();+ await page.getByPlaceholder("Create or Search title").fill(jobText);+ const jobTitle = page.getByRole("option", {+ name: jobText,+ exact: true,+ });+ if (await jobTitle.isVisible()) {+ await jobTitle.click();+ } else {+ await page.getByText(jobText).click();+ }+ await expect(page.getByLabel("Job Title")).toContainText(jobText);+ await page.getByLabel("Company").click();+ await page.getByPlaceholder("Create or Search company").click();+ const companyText = "company test";+ await page.getByPlaceholder("Create or Search company").fill(companyText);+ const companyTitle = page.getByRole("option", {+ name: companyText,+ exact: true,+ });+ if (await companyTitle.isVisible()) {+ await companyTitle.click();+ } else {+ await page.getByText(companyText).click();+ }+ await expect(page.getByLabel("Company")).toContainText(companyText);+ await page.getByLabel("Job Location").click();+ await page.getByPlaceholder("Create or Search location").click();+ const locationText = "location test";+ await page.getByPlaceholder("Create or Search location").fill(locationText);+ const locationTitle = page.getByRole("option", {+ name: locationText,+ exact: true,+ });+ if (await locationTitle.isVisible()) {+ await locationTitle.click();+ } else {+ await page.getByText(locationText).click();+ }+ await expect(page.getByLabel("Job Location")).toContainText(locationText);+ await page.getByLabel("Start Date").click();+ await page+ .getByRole("gridcell", { name: "2", exact: true })+ .first()+ .click();+ await page.locator("div:nth-child(2) > .tiptap").click();+ await page.locator("div:nth-child(2) > .tiptap").fill("test description");+ await page.getByRole("button", { name: "Save" }).click();+ await expect(page.getByRole("status").first()).toContainText(+ /Experience has been added/+ );+ await expect(page.getByRole("heading", { name: jobText })).toBeVisible();+ });++ test("should add resume education section", async ({ page }) => {+ const degreeText = "Bachelor of Science";+ await page.getByRole("link", { name: "Profile" }).click();+ await page+ .getByRole("row", { name: editedTitle })+ .getByTestId("resume-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 Education" }).click();+ await page.getByPlaceholder("Ex: Education").fill("Education");+ await page.getByPlaceholder("Ex: Stanford").click();+ await page.getByPlaceholder("Ex: Stanford").fill("test school");+ await page.getByLabel("Location").click();+ await page.getByPlaceholder("Create or Search location").click();+ const locationText = "location test";+ await page.getByPlaceholder("Create or Search location").fill(locationText);+ const locationTitle = page.getByRole("option", {+ name: locationText,+ exact: true,+ });+ if (await locationTitle.isVisible()) {+ await locationTitle.click();+ } else {+ await page.getByText(locationText).click();+ }+ await expect(page.getByLabel("Location")).toContainText(locationText);+ await page.getByPlaceholder("Ex: Bachelor's").click();+ await page.getByPlaceholder("Ex: Bachelor's").fill("degree text");+ await page.getByPlaceholder("Ex: Computer Science").click();+ await page+ .getByPlaceholder("Ex: Computer Science")+ .fill("computer science");+ await page.getByLabel("Start Date").click();+ await page+ .getByRole("gridcell", { name: "2", exact: true })+ .first()+ .click();+ await page.getByLabel("End Date").click();+ await page+ .getByRole("gridcell", { name: "3", exact: true })+ .first()+ .click();+ await page.locator("div:nth-child(2) > .tiptap").click();+ await page.locator("div:nth-child(2) > .tiptap").fill("test description");+ await page.getByRole("button", { name: "Save" }).click();+ await expect(page.getByRole("status").first()).toContainText(+ /Education has been added/+ );+ await expect(+ page.getByRole("heading", { name: "test school" })+ ).toBeVisible();});+test("should delete a resume", async ({ page }) => {await page.getByRole("link", { name: "Profile" }).click();await page.getByTestId("resume-actions-menu-btn").first().click();@@ -50,8 +222,6 @@ test.describe("Profile page", () => {await expect(page.getByRole("status").first()).toContainText(/Resume has been deleted successfully/);- await expect(page.locator("tbody")).not.toContainText(- "Test Resume 1 edited"- );+ await expect(page.locator("tbody")).not.toContainText(editedTitle);});});diff --git a/src/components/profile/ResumeContainer.tsx b/src/components/profile/ResumeContainer.tsxindex d4f57ca..5bb886b 100644--- a/src/components/profile/ResumeContainer.tsx+++ b/src/components/profile/ResumeContainer.tsx@@ -11,7 +11,7 @@ import AiSection from "../AiSection";function ResumeContainer({ resume }: { resume: Resume }) {const resumeSectionRef = useRef<AddResumeSectionRef>(null);- const { title, ContactInfo, ResumeSections } = resume;+ const { title, ContactInfo, ResumeSections } = resume ?? {};const summarySection = ResumeSections?.find((section) => section.sectionType === SectionType.SUMMARY