odai-alali / cypress-odiff Goto Github PK
View Code? Open in Web Editor NEWCypress Visual Regression Tests
Cypress Visual Regression Tests
Right now the peerDependencies lists
"peerDependencies": {
"cypress": "10.0.3"
}
so there is a dependency warning if you are using a newer major version of cypress 10.7.0
I would propose changing it to ^n if there are no issues.
thanks so much!
just run 'npm ci'
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/cypress
npm ERR! peer cypress@"^10.0.3" from [email protected]
npm ERR! node_modules/cypress-odiff
npm ERR! cypress-odiff@"1.1.1" from the root project
As per above screenshot, I have set the directory for the snapshot as customSnapshotsDir: "cypress/snapshots"
But when system adds additional sub-folders into that directory like \cypress\e2e\features
and then stores the the screenshot in particular test folder.
I don't want these additional sub-folders: \cypress\e2e\features
into the configured directory.
All the screenshot should be stored like \cypress\snapshots\test1.feature\<test-screenshots>
Is there anyway I can store the screenshot directly into the configured directory as per configuration under command.js
I am using cypress10 with cucumber hence I use multiple-cucumber-html-reporter
,
When there is difference between actual and expected image, it just shows the error like Screenshots does not match. 263553 pixels difference (29.1049943403%)
and attach the actual screenshot.
I also want to attach the .diff
screenshot with report.
Is there anyway we can attach the failing screenshot with multiple-cucumber-html-reporter
?
Below is my package.json
& cypress.config.js
Do we have retry
functionality while comparing the screenshot? We should have feature for retry while taking the screenshot,
Could you please introduce a new parameter as retry
under compareOptions
like below:
addCompareScreenshotCommand({
pluginOptions: {
customSnapshotsDir: "cypress\\snapshots"
},
compareOptions:{
threshold:0.3
retry: 2
}
});
It works fine for me but my tests are failing with minor difference, Is there anyway I can define the threshold so it can ignore the some pixel difference while comparing the snapshot?
It looks like this plugin only compare the whole screen.
Is there any way we can compare only specific element on the screen like below:
cy.get("#screen-canvas-container").compareScreenshot();
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.