30 lines
879 B
TypeScript
30 lines
879 B
TypeScript
import { addMatchImageSnapshotCommand } from '@simonsmith/cypress-image-snapshot/command';
|
|
import installLogsCollector from 'cypress-terminal-report/src/installLogsCollector';
|
|
|
|
import 'cypress-fail-fast';
|
|
import './commands';
|
|
import { acceptAllCookies } from './wpj';
|
|
|
|
addMatchImageSnapshotCommand({
|
|
failureThresholdType: 'percent',
|
|
failureThreshold: 0.01,
|
|
customDiffDir: 'cypress/snapshot_diffs',
|
|
});
|
|
|
|
Cypress.env('useDetailedLogging') && installLogsCollector();
|
|
|
|
before(() => {
|
|
// preventivně nastavit zemi na CZ, kvůli dopravě
|
|
cy.visit('/zeme/CZ');
|
|
cy.wait(5000);
|
|
acceptAllCookies();
|
|
});
|
|
// Cypress.on('uncaught:exception', e => {
|
|
// // TODO(hauschwitz): asi není nejlepší řešení, ale prozatim dobrý
|
|
// if (e.message.toLowerCase().match(/(sentry)|(\$)|(wpj\.onready)/).length > 1) {
|
|
// return false;
|
|
// }
|
|
//
|
|
// throw e;
|
|
// });
|