Skip to content

Additional options for updating images #204

Open
@dhulme

Description

@dhulme

Is your feature request related to a problem? Please describe.
To avoid issues causes by Windows/Linux rendering, we capture all our screenshots in a separate CI job using the updateImages option. But this has two limitations:

  • Missing images are generated regardless of value of updateImages
  • All images are captured, not just those for tests that fail

Describe the solution you'd like
Two news options:

  • createMissingImages - defaults to true. When false causes compariosn to fail if no 'old' image is found
  • updateImagesOnFailure - update images only when comparison fails

Describe alternatives you've considered
I tried implementing updateImagesOnFailure outside the library by catching test failures then updating images, but it's a bit cumbersome and does not handle missing images how I would like.

Please could you let me know your thoughts on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions