Comments (4)
Thanks for raising this issue. Is there any specific need to have this behavior the same as in v3? Because with Cypress' specPattern
option it's difficult to predict the location of spec files, hence the base folder was used with no nesting.
In hindsight, the thing I obviously missed is to make this visible for users who upgrade.
from cypress-visual-regression.
Personally, I don't, I can live with that :) However, I can imagine a scenario where one has the same spec names in different directories so they will have to remember to use unique snapshot names in specs so they don't conflict across these specs.
from cypress-visual-regression.
@TomaszG Precisely that. I have this situation right now. In our project, the folder structure is:
/components
/atoms
/molecules
/organisms
…
Now, if I have both atom and molecule components with the same name (eg. Link), previously, it would replicate the structure of folders, but now, it will mush them together into one.
- Before:
/cypress/component/snapshots/base/components/atoms/Link/Link.test.tsx/External-1024x768.png
/cypress/component/snapshots/base/components/molecules/Link/Link.test.tsx/External-1024x768.png
- After:
/cypress/component/snapshots/base/Link.test.tsx/External-1024x768.png
/cypress/component/snapshots/base/Link.test.tsx/External-1024x768.png
The path produced in both components is the same.
Currently, we don't face issues because components have unique names. However, this could be problematic in certain situations.
from cypress-visual-regression.
Hey @TomaszG , @lamberski I will take a look at this issue soon, Thanks for reporting
cc: @Zaista
from cypress-visual-regression.
Related Issues (20)
- Add the command to cypress/support/commands.js no work HOT 2
- [BUG] Wrong screenshot position HOT 2
- The "type" environment variable is unknown. HOT 1
- e2e.setupNodeEvents() function: TypeError: (0 , plugin_1.default) is not a function HOT 5
- `env` object in config file or not? HOT 1
- failSilently and ALLOW_VISUAL_REGRESSION_TO_FAIL, confusing HOT 1
- Base in Mac, diff in Jenkins (actual) HOT 7
- Error: Snapshot does not exist after upgrade from 2.1.1 to 3.0.0 HOT 2
- CypressError: cy.task('moveSnapshot') failed HOT 2
- testFiles is deprecated, replace with specPattern
- Base screenshot doesnt get the full screen HOT 1
- Module not found: Can't resolve 'fs' error HOT 1
- cypress-mochawesome-reporter failing when used with cypress-visual-regression HOT 3
- `getSpecRelativePath()` returns invalid path on windows based hosts HOT 1
- Compare a single HTML element is not working as expected HOT 4
- Changelog entry / upgrade guide for v4? HOT 4
- No option to override test type through CLI in v4 HOT 4
- Compared screenshot path does not match initial screenshot path HOT 5
- Path issue with component testing HOT 8
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-visual-regression.