Skip to content

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

@GuilleDF

Description

@GuilleDF

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions