Files
edr-platform/e2e/freight/cypress/support/e2e.ts

19 lines
692 B
TypeScript

import "./commands";
// The API's user seeders are disabled in app code — the SQL fixture creates
// the staff + demo test users instead. Idempotent, runs before each spec file.
before(() => {
cy.task("db:seedUsers");
});
// Third-party noise (PostHog, Google Maps, socket.io reconnects) can throw
// uncaught exceptions that are irrelevant to the assertion under test. App
// errors still fail tests via failed assertions / failed intercepts.
Cypress.on("uncaught:exception", (err) => {
const ignorable = [/posthog/i, /google/i, /websocket/i, /socket\.io/i, /ResizeObserver/i];
if (ignorable.some((pattern) => pattern.test(err.message))) {
return false;
}
return true;
});