[Question] How is the snapshot path built?
See original GitHub issueI am having issues understanding how the path of the snapshot files is created when calling toMatchSnapshot
. In my example
- I have a test file called pages.spec.ts and another one called detailsSlideover.spec.ts
- when running all tests and calling
toMatchSnapshot
inside of pages.spec.ts the snapshot is stored in …/detailsSlideover.spec.ts-snapshots. See image below.
Unfortunately this is not “stable”, so if I only run tests for the one file explicitly, its snapshots are stored in a folder with the “correct” name.
Any hints on this? Am I missing an important configuration path, is it a race condition in playwright, is it on purpose?
some context:
- My configuration resembles https://github.com/vercel/next.js/tree/canary/examples/with-playwright.
- I call
pnpm playwright test
&pnpm playwright test pages
to execute the tests, though regular “npm run” does not seem to make any difference @playwright/test
is used in version 1.19.2- this happens as well on MacOs as on Docker in CI
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
What exactly is a Maven Snapshot and why do we need it?
A Maven SNAPSHOT is an artifact created by a Maven build and pretends to help developers in the software development cycle.
Read more >Snapshot Testing - Jest
A typical snapshot test case renders a UI component, takes a snapshot, then compares it to a reference snapshot file stored alongside the...
Read more >Create Amazon EBS snapshots - AWS Documentation
Create snapshots of an Amazon EBS volume or create multi-volume snapshots to use as a baseline for new volumes or for data backup....
Read more >How do I change the snapshots directory in VirtualBox on ...
Shutdown intended virtual machine; > 2. Right click on virtual machine, go to Settings > General > Advanced; > 3. Change Snapshots destination...
Read more >Where do Database Snapshots store the information what ...
The snapshot files contain only the data that has changed from the source. For every file, SQL Server creates a bitmap that is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @aslushnikov sure. I fixed it already the way you pointed me to, but will checkout the old commit later on to provide feedback
@mdugue do you require
pages.spec.ts
fromdetailsSlideover.spec.ts
or vice versa?