wswebcreation / webdriver-image-comparison

MIT License
43 stars 36 forks source link

Indicate when baseline image was missing/created #127

Closed smichaelsen closed 1 year ago

smichaelsen commented 1 year ago

When the CI runs our visual tests then I assume that we have baseline images for all of our cases. However images can be forgotten to be pushed, accidentally deleted, screen resolution changes and with it the file name, etc.

In all these cases our tests will pass, because the check function silently creates the baseline image and returns a result with misMatchPercentage: 0. It would be great if the result could contain an additional property like baselineImageCreated: 1 to indicate what happened. Our test code could react to it and fail the test in a CI scenario.

wswebcreation commented 1 year ago

Hi @smichaelsen

Thanks for your ticket, I'm assuming you added autoSaveBaseline: true in your config when you start your CI. This is not something what I would suggest, but feel free to submit a PR, then please change the result to baselineImageCreated: boolean

smichaelsen commented 1 year ago

You are right, I missed the autoSaveBaseline option. Disabling it in the CI helped me. I'm not interested anymore in my suggested feature, and if you're not either then it can be closed. Thanks for the helpful response!

wswebcreation commented 1 year ago

Closing this then. Thanks