From ed737536d57ce6004b69d9ba27312d1e1cbe1093 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sun, 7 Aug 2022 20:52:53 +0000 Subject: [PATCH] --- e2e/open.bat | 2 +- e2e/support/commands.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/e2e/open.bat b/e2e/open.bat index 9a4020a..52e2b79 100644 --- a/e2e/open.bat +++ b/e2e/open.bat @@ -1 +1 @@ -./node_modules/.bin/cypress open --browser chrome --e2e +./node_modules/.bin/cypress open --browser firefox --e2e diff --git a/e2e/support/commands.js b/e2e/support/commands.js index 2ebd282..2258259 100644 --- a/e2e/support/commands.js +++ b/e2e/support/commands.js @@ -24,6 +24,20 @@ // -- This will overwrite an existing command -- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) +//For firefox only issue chrome ok when running all test since cypress v10 +//https://docs.cypress.io/api/events/catalog-of-events#Uncaught-Exceptions +Cypress.on('uncaught:exception', (err, runnable, promise) => { + // when the exception originated from an unhandled promise + // rejection, the promise is provided as a third argument + // you can turn off failing the test in this case + if (promise) { + return false + } + // we still want to ensure there are no other unexpected + // errors, so we let them fail the test +}) + + Cypress.Commands.add("ayChooseVSelect", (dataCyTag, selectionText) => { cy.get(`[data-cy='${dataCyTag}']`).click({ force: true }); cy.get(".v-list-item__title")