From b35980618d46ed43d7374e9b3753da82681cb679 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Wed, 25 Feb 2026 02:40:54 +0530 Subject: [PATCH] test(e2e): switch board task spec to local auth --- frontend/cypress/e2e/board_tasks.cy.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/frontend/cypress/e2e/board_tasks.cy.ts b/frontend/cypress/e2e/board_tasks.cy.ts index 441b65cf..d368d587 100644 --- a/frontend/cypress/e2e/board_tasks.cy.ts +++ b/frontend/cypress/e2e/board_tasks.cy.ts @@ -2,8 +2,7 @@ describe("/boards/:id task board", () => { const apiBase = "**/api/v1"; - const email = - Cypress.env("CLERK_TEST_EMAIL") || "jane+clerk_test@example.com"; + const email = "local-auth-user@example.com"; const originalDefaultCommandTimeout = Cypress.config("defaultCommandTimeout"); @@ -32,9 +31,11 @@ describe("/boards/:id task board", () => { cy.get('[aria-label="Edit task"]', { timeout: 20_000 }).should("be.visible"); } - it("auth negative: signed-out user is redirected to sign-in", () => { + it("auth negative: signed-out user is shown local auth login", () => { cy.visit("/boards/b1"); - cy.location("pathname", { timeout: 30_000 }).should("match", /\/sign-in/); + cy.contains("h1", /local authentication/i, { timeout: 30_000 }).should( + "be.visible", + ); }); it("happy path: renders tasks from snapshot and supports create + status update + delete (stubbed)", () => { @@ -204,10 +205,7 @@ describe("/boards/:id task board", () => { body: { items: [], total: 0, limit: 200, offset: 0 }, }).as("taskComments"); - cy.visit("/sign-in"); - cy.clerkLoaded(); - cy.clerkSignIn({ strategy: "email_code", identifier: email }); - + cy.loginWithLocalAuth(); cy.visit("/boards/b1"); cy.waitForAppLoaded();