From 1045267d4ce3b26d42cc00f8338c810b528f6aeb Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Wed, 25 Feb 2026 01:39:04 +0530 Subject: [PATCH] feat: add groupSnapshot alias and handle hydration mismatch in E2E tests --- frontend/cypress/e2e/board_tasks.cy.ts | 3 ++- frontend/cypress/support/e2e.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/cypress/e2e/board_tasks.cy.ts b/frontend/cypress/e2e/board_tasks.cy.ts index 13e3f7c5..441b65cf 100644 --- a/frontend/cypress/e2e/board_tasks.cy.ts +++ b/frontend/cypress/e2e/board_tasks.cy.ts @@ -137,7 +137,7 @@ describe("/boards/:id task board", () => { cy.intercept("GET", `${apiBase}/boards/b1/group-snapshot*`, { statusCode: 200, body: { group: null, boards: [] }, - }); + }).as("groupSnapshot"); cy.intercept("POST", `${apiBase}/boards/b1/tasks`, (req) => { // Minimal assertion the UI sends expected fields. @@ -213,6 +213,7 @@ describe("/boards/:id task board", () => { cy.wait([ "@snapshot", + "@groupSnapshot", "@membership", "@me", "@organizations", diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts index 369182a5..a1b252f3 100644 --- a/frontend/cypress/support/e2e.ts +++ b/frontend/cypress/support/e2e.ts @@ -5,6 +5,15 @@ import { addClerkCommands } from "@clerk/testing/cypress"; +// Clerk/Next.js occasionally throws a non-deterministic hydration mismatch +// on /sign-in. Ignore this known UI noise so E2E assertions can proceed. +Cypress.on("uncaught:exception", (err) => { + if (err?.message?.includes("Hydration failed")) { + return false; + } + return true; +}); + addClerkCommands({ Cypress, cy }); import "./commands";