From 05ce867802d87316a7a3fe796ed25df292c1a647 Mon Sep 17 00:00:00 2001 From: Jesse Khorasanee Date: Fri, 21 Jun 2024 15:07:45 +1200 Subject: [PATCH] Catch exception from flatmap-viewer which is crashing the test --- cypress/support/component.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cypress/support/component.js b/cypress/support/component.js index 9f175f66..a9277c19 100644 --- a/cypress/support/component.js +++ b/cypress/support/component.js @@ -35,3 +35,13 @@ Cypress.Commands.add('mount', (component, options = {}) => { return mount(component, options); }); + +Cypress.on('uncaught:exception', (err, runnable) => { + // we expect a flatmap-viewer error with message ''Graph.addNode' + // and don't want to fail the test so we return false + if (err.message.includes('Graph.addNode')) { + return false + } + // we still want to ensure there are no other unexpected + // errors, so we let them fail the test +})