-
-
Notifications
You must be signed in to change notification settings - Fork 22
Different path in case of 'cypress run' and 'cypress open' test execution #155
-
Hi, I've tried to use this great plugin, but we've found that path is different for saving files in case of "cypress open..." and "cypress run...". I've seen that seems this is a Cypress bug (issue), but is it possible somehow to save snapshots without all extra prefixes to one folder for example? Thanks in advance!
Screenshot 2022年10月18日 at 14 50 33
Beta Was this translation helpful? Give feedback.
All reactions
Hello @viktorgogulenko,
Can you please provide a reproduction repo where this happens? (or at least configuration that you're using?)
I'm asking about that, because the directory structure seems to be off (the cp-visual-refression-diff_snapshots directory should be cleaned up after plugins' work and screenshots should be moved to a different path).
Replies: 2 comments 4 replies
-
Hello @viktorgogulenko,
Can you please provide a reproduction repo where this happens? (or at least configuration that you're using?)
I'm asking about that, because the directory structure seems to be off (the cp-visual-refression-diff_snapshots directory should be cleaned up after plugins' work and screenshots should be moved to a different path).
Beta Was this translation helpful? Give feedback.
All reactions
-
What is happening from your side if you are executing the same test using Cypress GUI ("../node_modules/.bin/cypress open") and "cypress run" ("../node_modules/.bin/cypress run --spec=integration/snapshotTesting/snapshotTest.spec.js --browser=chrome")? Because for me it easily could be reproduced - plugin saves screenshots in two different folders :( I've set env to:
pluginVisualRegressionImagesDir: 'screenshots/tests/'
Beta Was this translation helpful? Give feedback.
All reactions
-
If I run the example test suite locally I get images stored:
- from E2E tests images are stored within
example/cypress/e2e/__image_snapshots_local__
, - from component-testing images are stored within
example/cypress/component/__image_snapshots_local__
.
Can you reproduce the same behaviour for the example project or do you get something different?
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @FRSgit for really quick response. After few more tries I realised that was looking into the wrong place and seems plugin works as expected.
Beta Was this translation helpful? Give feedback.
All reactions
-
Good to hear that @viktorgogulenko, thanks for the update!
Though I am a bit worried that you were able to even see the __cp-visual-refression-diff_snapshots__
directory on your hard drive (it should've been removed after plugin finished it work. Would you have any details on how to reproduce this behavior?
Beta Was this translation helpful? Give feedback.
All reactions
-
Closing this one as stale - but I believe we've answered the main question. Thanks for raising this discussion topic!
Beta Was this translation helpful? Give feedback.