Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storeReceivedOnFailure refuses to store received images in a CI environment #331

Open
GuilleDF opened this issue Apr 20, 2023 · 1 comment

Comments

@GuilleDF
Copy link

I'm trying to make use of the storeReceivedOnFailure option, from the README:

storeReceivedOnFailure: (default: false) Store the received images separately from the composed diff images on failure. This can be useful when updating baseline images from CI.

But when I run it in my CI environment I get the following error:

New snapshot was not written. The update flag must be explicitly passed to write a new snapshot.
 + This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default.
  30 |     failureThresholdType: 'percent',
  31 |     failureThreshold: 0.01,
> 32 |     storeReceivedOnFailure: true,
     |                   ^
  33 |     customReceivedDir: '__snapshots__/__new__',
  34 |   });
  35 | };

I can't pass the update flag as suggested since I still want the test to fail, but I need the images to be written so I can use them in a separate job to update the baseline if needed.

I'm using version 6.1.0

@donaldpipowitch
Copy link
Contributor

I see the same for new snapshots that don't exist yet. I haven't tested it with different snapshots so far, but I'd have expected that the new snapshots would also be saved in the CI within the "received directory", so that I can easily download them from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants