mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-30 01:24:55 +01:00
b804403c42
Improve testing flow and docs * update snapshots * update snapshots * update snapshots * Add docker run instructions * Hide image snapshot execution behind an env flag * Simplify package.json scripts and improve docs * Merge 'origin/develop' into feature/tests-and-docs * Update snapshots * Add wait to container test * Update snapshot Approved-by: Paulo Veiga
19 lines
556 B
TypeScript
19 lines
556 B
TypeScript
import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';
|
|
import '@testing-library/cypress/add-commands';
|
|
|
|
addMatchImageSnapshotCommand();
|
|
|
|
// make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set
|
|
// otherwise it calls a noop
|
|
if (Cypress.env('imageSnaphots')) {
|
|
addMatchImageSnapshotCommand();
|
|
} else {
|
|
Cypress.Commands.add(
|
|
'matchImageSnapshot',
|
|
{
|
|
prevSubject: ['optional', 'element', 'window', 'document'],
|
|
},
|
|
() => Promise.resolve()
|
|
);
|
|
}
|