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(e2e): update activity-start tests for stay-on-tasks behavior
Khuram Niazc567f5e55844
diff --git a/e2e/dashboard.spec.ts b/e2e/dashboard.spec.tsindex d937120..141eb8a 100644--- a/e2e/dashboard.spec.ts+++ b/e2e/dashboard.spec.ts@@ -180,7 +180,9 @@ test.describe("Dashboard page", () => {} catch {// No conflicting activity, continue.}- await expect(page).toHaveURL(/\/dashboard\/activities/);+ await expect(+ page.getByRole("button", { name: "Stop" }),+ ).toBeVisible({ timeout: 10000 });await page.getByRole("button", { name: "Stop" }).click({ force: true });await expect(page.getByRole("button", { name: "Stop" })).not.toBeVisible({diff --git a/e2e/tasks.spec.ts b/e2e/tasks.spec.tsindex ba6e02c..fc8a193 100644--- a/e2e/tasks.spec.ts+++ b/e2e/tasks.spec.ts@@ -240,7 +240,7 @@ test.describe("Tasks Management", () => {}});- test("should start activity from task and redirect to activities", async ({+ test("should start activity from task and stay on tasks", async ({page,cleanup,}) => {@@ -263,7 +263,10 @@ test.describe("Tasks Management", () => {.getByTestId("task-start-activity-btn").click({ force: true });- await expect(page).toHaveURL(/\/dashboard\/activities/);+ await expect(page).toHaveURL(/\/dashboard\/tasks/);+ await expect(+ page.getByRole("button", { name: "Stop" }),+ ).toBeVisible({ timeout: 10000 });// Stop the running activity (the linked activity row is removed by the// cleanup fixture along with the task).@@ -293,7 +296,9 @@ test.describe("Tasks Management", () => {await taskRow.getByTestId("task-start-activity-btn").click({ force: true });- await expect(page).toHaveURL(/\/dashboard\/activities/);+ await expect(+ page.getByRole("button", { name: "Stop" }),+ ).toBeVisible({ timeout: 10000 });// Stop the activity so we can test restarting from the task. Wait for// the global activity banner to actually clear before proceeding —@@ -316,11 +321,13 @@ test.describe("Tasks Management", () => {taskRowAfter.getByTestId("task-start-activity-btn"),).toBeVisible();- // Clicking it restarts the activity (redirects to activities page)+ // Clicking it restarts the activity (stays on tasks page)await taskRowAfter.getByTestId("task-start-activity-btn").click({ force: true });- await expect(page).toHaveURL(/\/dashboard\/activities/);+ await expect(+ page.getByRole("button", { name: "Stop" }),+ ).toBeVisible({ timeout: 10000 });// Stop the restarted activity to leave a clean stateawait page.getByRole("button", { name: "Stop" }).click({ force: true });