mirror of
https://github.com/ducbao414/win32.run.git
synced 2025-12-17 01:32:50 +09:00
init the awkward code
This commit is contained in:
14
static/html/jspaint/cypress/support/commands.js
Normal file
14
static/html/jspaint/cypress/support/commands.js
Normal 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);
|
||||
}
|
||||
})
|
||||
7
static/html/jspaint/cypress/support/index.js
Normal file
7
static/html/jspaint/cypress/support/index.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// ***********************************************************
|
||||
// This support/index.js is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// https://on.cypress.io/configuration
|
||||
|
||||
import './commands'
|
||||
Reference in New Issue
Block a user