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
Fix failing playwright tests
Khuram Niaz78a090f7f819
diff --git a/e2e/profile.spec.ts b/e2e/profile.spec.tsindex 6fe65d8..4226b0f 100644--- a/e2e/profile.spec.ts+++ b/e2e/profile.spec.ts@@ -24,12 +24,12 @@ test.describe("Profile page", () => {await page.getByRole("link", { name: "Profile" }).click();await createResume(page, resumeTitle);await expect(page.getByRole("status").first()).toContainText(- /Resume title has been created/+ /Resume title has been created/,);await expect(page.locator("tbody")).toContainText(resumeTitle);await deleteResume(page, resumeTitle);await expect(page.getByRole("status").first()).toContainText(- /Resume has been deleted successfully/+ /Resume has been deleted successfully/,);});@@ -53,16 +53,16 @@ test.describe("Profile page", () => {.getByRole("button", { name: "Save" }).click();await expect(page.getByRole("status").first()).toContainText(- /Resume title has been updated/+ /Resume title has been updated/,);await expect(page.locator("tbody")).toContainText(editedTitle);await deleteResume(page, editedTitle);await expect(page.getByRole("status").first()).toContainText(- /Resume has been deleted successfully/+ /Resume has been deleted successfully/,);});test("should add resume contact info", async ({ page }) => {- const resumeTitle = "Test Resume 3";+ const resumeTitle = `Test Resume 3 ${Date.now()}`;await page.getByRole("link", { name: "Profile" }).click();await createResume(page, resumeTitle);await page@@ -74,32 +74,34 @@ test.describe("Profile page", () => {// 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").waitFor({ state: "visible" });+ await page.getByLabel("First Name").click();await page.getByLabel("First Name").fill("John");- await page.getByLabel("First Name").press("Tab");+ await page.getByLabel("Last Name").click();await page.getByLabel("Last Name").fill("Doe");- await page.getByLabel("Last Name").press("Tab");+ await page.getByLabel("Headline").click();await page.getByLabel("Headline").fill("Skill developer with testing skills");- await page.getByLabel("Headline").press("Tab");+ await page.getByLabel("Email").click();await page.getByLabel("Email").fill("[email protected]");- await page.getByLabel("Email").press("Tab");+ await page.getByLabel("Phone").click();await page.getByLabel("Phone").fill("123456789");- await page.getByLabel("Phone").press("Tab");+ await page.getByLabel("Address").click();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/+ /Contact Info has been created/,);await expect(page.getByRole("heading", { name: "John Doe" })).toBeVisible();await deleteResume(page, resumeTitle);await expect(page.getByRole("status").first()).toContainText(- /Resume has been deleted successfully/+ /Resume has been deleted successfully/,);});test("should add resume summary section", async ({ page }) => {- const resumeTitle = "Test Resume 4";+ const resumeTitle = `Test Resume 4 ${Date.now()}`;await page.getByRole("link", { name: "Profile" }).click();await createResume(page, resumeTitle);await page@@ -118,11 +120,11 @@ test.describe("Profile page", () => {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/+ /Summary has been created/,);await deleteResume(page, resumeTitle);await expect(page.getByRole("status").first()).toContainText(- /Resume has been deleted successfully/+ /Resume has been deleted successfully/,);});@@ -133,14 +135,14 @@ test.describe("Profile page", () => {await createResume(page, resumeTitle);await addExperience(page, resumeTitle, jobText);await expect(page.getByRole("status").first()).toContainText(- /Experience has been added/+ /Experience has been added/,);await expect(- page.getByRole("heading", { name: jobText }).first()+ page.getByRole("heading", { name: jobText }).first(),).toBeVisible();await deleteResume(page, resumeTitle);await expect(page.getByRole("status").first()).toContainText(- /Resume has been deleted successfully/+ /Resume has been deleted successfully/,);});@@ -153,28 +155,28 @@ test.describe("Profile page", () => {await createResume(page, resumeTitle);await addExperience(page, resumeTitle, jobText);await expect(page.getByRole("status").first()).toContainText(- /Experience has been added/+ /Experience has been added/,);await expect(- page.getByRole("heading", { name: jobText }).first()+ page.getByRole("heading", { name: jobText }).first(),).toBeVisible();await page.getByText(jobText + "Edit").getByRole("button", { name: "Edit" }).click();await expect(- page.getByRole("heading", { name: "Edit Experience" })+ page.getByRole("heading", { name: "Edit Experience" }),).toBeVisible();await page.getByText("Cancel").click();await page.getByRole("button", { name: "Add Section" }).click();await page.getByRole("menuitem", { name: "Add Experience" }).click();await expect(- page.getByRole("heading", { name: "Add Experience" })+ page.getByRole("heading", { name: "Add Experience" }),).toBeVisible();await page.getByText("Cancel").click();await deleteResume(page, resumeTitle);await expect(page.getByRole("status").first()).toContainText(- /Resume has been deleted successfully/+ /Resume has been deleted successfully/,);});@@ -242,14 +244,14 @@ test.describe("Profile page", () => {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/+ /Education has been added/,);await expect(- page.getByRole("heading", { name: "test school" }).first()+ page.getByRole("heading", { name: "test school" }).first(),).toBeVisible();await deleteResume(page, resumeTitle);await expect(page.getByRole("status").first()).toContainText(- /Resume has been deleted successfully/+ /Resume has been deleted successfully/,);});});@@ -342,7 +344,7 @@ async function deleteResume(page: Page, title: string) {await row.getByTestId("resume-actions-menu-btn").click({ force: true });await page.getByRole("menuitem", { name: "Delete" }).click({ force: true });await expect(page.getByRole("alertdialog")).toContainText(- "Are you sure you want to delete this resume?"+ "Are you sure you want to delete this resume?",);await page.getByRole("button", { name: "Delete" }).click({ force: true });}diff --git a/e2e/signin.spec.ts b/e2e/signin.spec.tsindex d1293c0..ac709f0 100644--- a/e2e/signin.spec.ts+++ b/e2e/signin.spec.ts@@ -3,13 +3,13 @@ import { test, expect } from "@playwright/test";test("Signin page has title", async ({ page }) => {await page.goto("/");- await expect(page).toHaveTitle("Signin | JobSync");+ await expect(page).toHaveTitle("Sign In | JobSync");++ await expect(page.getByRole("heading", { name: "JobSync" })).toBeVisible();await expect(- page.getByRole("heading", { name: "JobSync - Job Search Assistant" })+ page.getByRole("heading", { name: "Welcome back" }),).toBeVisible();-- await expect(page.getByRole("heading", { name: "Login" })).toBeVisible();});test("Signin and out from app", async ({ page, baseURL }) => {@@ -25,5 +25,7 @@ test("Signin and out from app", async ({ page, baseURL }) => {await page.getByRole("button", { name: "Avatar" }).click();await page.getByRole("button", { name: "Logout" }).click();- await expect(page.getByRole("heading", { name: "Login" })).toBeVisible();+ await expect(+ page.getByRole("heading", { name: "Welcome back" }),+ ).toBeVisible();});