mirror of
https://github.com/ducbao414/win32.run.git
synced 2025-12-17 01:32:50 +09:00
15 lines
379 B
JavaScript
15 lines
379 B
JavaScript
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);
|
|
}
|
|
})
|