init the awkward code

This commit is contained in:
Bao Nguyen
2023-02-13 19:32:10 +07:00
commit 27170afcac
5426 changed files with 1244579 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';
addMatchImageSnapshotCommand({
failureThreshold: 0,
failureThresholdType: 'pixel',
customDiffConfig: { threshold: 0 },
capture: 'viewport',
});
Cypress.Commands.add("setResolution", (size) => {
if (Cypress._.isArray(size)) {
cy.viewport(size[0], size[1]);
} else {
cy.viewport(size);
}
})