From 7d368bf0c3c0b94c4992c0de367fcf5b66338e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sun, 8 Mar 2026 18:32:48 +0800 Subject: [PATCH] Remove per-spec uncaught-exception swallowing in Cypress E2E tests Co-Authored-By: Codex --- cypress/e2e/discoverMap.cy.js | 2 -- cypress/e2e/discoverTabs.cy.js | 2 -- cypress/e2e/filesToDiscover.cy.js | 2 -- cypress/e2e/notFound404.cy.js | 5 ----- 4 files changed, 11 deletions(-) diff --git a/cypress/e2e/discoverMap.cy.js b/cypress/e2e/discoverMap.cy.js index 81b4514..b2a6c7c 100644 --- a/cypress/e2e/discoverMap.cy.js +++ b/cypress/e2e/discoverMap.cy.js @@ -8,8 +8,6 @@ import { loginWithFixtures } from "../support/intercept"; describe("Discover Map Page", () => { beforeEach(() => { loginWithFixtures(); - // Suppress Cytoscape rendering errors in headless mode - cy.on("uncaught:exception", () => false); cy.visit("/discover/log/297310264/map"); cy.wait("@getDiscover"); }); diff --git a/cypress/e2e/discoverTabs.cy.js b/cypress/e2e/discoverTabs.cy.js index 1ed86b7..099d47a 100644 --- a/cypress/e2e/discoverTabs.cy.js +++ b/cypress/e2e/discoverTabs.cy.js @@ -8,8 +8,6 @@ import { loginWithFixtures } from "../support/intercept"; describe("Discover Tab Navigation", () => { beforeEach(() => { loginWithFixtures(); - // Suppress Cytoscape rendering errors in headless mode - cy.on("uncaught:exception", () => false); }); describe("navigating from Map page", () => { diff --git a/cypress/e2e/filesToDiscover.cy.js b/cypress/e2e/filesToDiscover.cy.js index 9e796bc..b631647 100644 --- a/cypress/e2e/filesToDiscover.cy.js +++ b/cypress/e2e/filesToDiscover.cy.js @@ -8,8 +8,6 @@ import { loginWithFixtures } from "../support/intercept"; describe("Files to Discover Entry Flow", () => { beforeEach(() => { loginWithFixtures(); - // Suppress Cytoscape rendering errors in headless mode - cy.on("uncaught:exception", () => false); cy.visit("/files"); cy.wait("@getFiles"); }); diff --git a/cypress/e2e/notFound404.cy.js b/cypress/e2e/notFound404.cy.js index c0f8fff..b450153 100644 --- a/cypress/e2e/notFound404.cy.js +++ b/cypress/e2e/notFound404.cy.js @@ -6,11 +6,6 @@ import { loginWithFixtures } from "../support/intercept"; describe("404 Not Found Page", () => { - beforeEach(() => { - // Suppress Navbar error on 404 page (route.matched[1] is null) - cy.on("uncaught:exception", () => false); - }); - it("displays 404 page for non-existent route", () => { loginWithFixtures(); cy.visit("/this-page-does-not-exist");