Skip to content
Snippets Groups Projects
Unverified Commit 5b1735ee authored by Paul Rosenzweig's avatar Paul Rosenzweig Committed by GitHub
Browse files

ignore applicatino errors in cypress (#11551)

parent 5e5caf64
No related branches found
No related tags found
No related merge requests found
......@@ -9,3 +9,5 @@ export function signInAsNormalUser() {
}
export const plainDbHost = Cypress.env("PLAIN_DB_HOST");
Cypress.on("uncaught:exception", (err, runnable) => false);
......@@ -2,5 +2,5 @@
"testFiles": "**/*.cy.spec.js",
"pluginsFile": "frontend/test/cypress-plugins.js",
"integrationFolder": "frontend/test",
"supportFile": false
"supportFile": "frontend/test/__support__/cypress.js"
}
import { signInAsAdmin } from "__support__/cypress";
describe("dashboard", () => {
Cypress.on("uncaught:exception", (err, runnable) => false);
beforeEach(signInAsAdmin);
it("should have the correct embed snippet", () => {
......
import { signInAsNormalUser } from "__support__/cypress";
describe("NativeQueryEditor", () => {
beforeEach(() => {
signInAsNormalUser();
cy.on("uncaught:exception", (err, runnable) => {
// ignore the error if it's a "script error"
if (err.message.match(/^Script error./)) {
return false;
}
// otherwise, let Cypress fail as usual
return true;
});
});
beforeEach(signInAsNormalUser);
it("lets you create and run a SQL question", () => {
cy.visit("/question/new");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment