Comments (6)
I've opened the following bug against cypress repo:
from cypress-image-diff.
Thanks a lot for pointing this out, I will have a look and provide a fix as soon as I can!
from cypress-image-diff.
Ok, I've been working to try to fix this and there is no non-hacky way of doing this..
When taking screenshots, cypress would store and create folder structures that matched your spec structure based on the below information:
// Cypress 9.x
{
name: 'folder-structure-test/folder-structure-spec-wholePage',
specName: 'folder-structure-test/folder-structure-spec.js',
path: '/Users/filipporaimondi/code/cypress-image-diff/cypress/screenshots/folder-structure-test/folder-structure-spec.js/folder-structure-test/folder-structure-spec-wholePage (1).png',
...
}
If you see below, you can notice that the same object provided by Cypress 10.x has a missing property called specName
and flattens any folder structure from the other properties (I.E path
), hence it puts all screenshots in the same folder...
// Cypress 10.x
{
name: 'folder-structure.cy-wholePage',
path: '/Users/filipporaimondi/code/cypress-image-diff/cypress/screenshots/folder-structure.cy-wholePage (1).png',
...
}
There are ways of course to handle this, but it would require quite a significant amount of rework and it would feel extremely hacky and for sure it wouldn't work for all cases... given it would rely on knowing a folder structure and this folder structure can be changed by cypress integrationFolder
configurable path...
Unfortunately for now there will be a Cypress 10.x limitation...
I will be opening a ticket against cypress, which hopefully they can fix quickly, given I won't ask them to revert this breaking change, but just simply include specName
that contains the folder structure so we can create it ourselves on a after:screenshot
hook... once they provide this property again I can easily update this package to support complex folder structure again.
from cypress-image-diff.
Any update on this? I had the same issue with headless mode and therefore my tests break the CI jobs. Any workaround there so far?
from cypress-image-diff.
This issue is stale because it has been open for 30 days with no activity.
from cypress-image-diff.
This issue was closed because it has been inactive for 30 days since being marked as stale.
from cypress-image-diff.
Related Issues (20)
- Custom config file is not working HOT 14
- Cannot find module cypress-image-diff-js/dist/plugin HOT 12
- Error preparing file: cypress/support/e2e.js HOT 8
- Config "FAILURE_THRESHOLD" did not work HOT 5
- Cypress integration broken: The deleteScreenshot 'task' event has not been registered in the setupNodeEvents method. You must register it before using cy.task() HOT 4
- User config error `cypress-image-diff.config.js`
- Missing JSON report when in `cypress OPEN` mode HOT 3
- Unable to update folder locations HOT 5
- Unable to generate JSON REPORT under Folder cypress-image-diff-html-report HOT 1
- Specify shared location/path for Screenshots and Reports HOT 2
- Package subpath './dist/plugin' is not defined by "exports"... HOT 8
- Intermittent Error: ENOENT: no such file or directory, open '/a/b/foo.png'
- Error: ERR_PACKAGE_PATH_NOT_EXPORTED HOT 4
- Trying to test maps but have uggly cut offs. HOT 1
- Component's transform translate changes unexpectedly during screenshot HOT 2
- Ability to reverse error - throw error if snapshots are the same and continue the test on different ones HOT 3
- Generate JSON Reports for Cypress Image Diff HTML Report when running GUI tests HOT 2
- Option to add browser name to screenshot or directory HOT 1
- JSON report not generated when cypress-split plugin in also used HOT 2
- Missing cucumber report when using cypress-image-diff and cypress-cucumber-preprocessor HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-image-diff.