webdriverio/visual-testing

Auto generate baseline if not existing and make `autoSaveBaseline` default to `true`

christian-bromann opened this issue · 2 comments

Is your feature request related to a problem? Please describe.

When starting to run visual tests everyone starts with no baseline. Right now if you would add an assertion to your test like:

await expect($('#element-id')).toMatchElementSnapshot('firstButtonElement')

it would fail with Baseline image not found, save the actual image manually to the baseline..

Describe the solution you'd like
Like Jest or Vitest it would be nice if the service could establish a baseline if an image with a certain label hasn't been found in there. This would make it much simpler to build up a baseline without having to set autoSaveBaseline to true.

Is there any reason we should not have this default to true?

Describe alternatives you've considered
n/a

Additional context
n/a

Great idea, I'm now busy with supporting native apps and will make more stuff default. I will also add this one as a default

autoSaveBaseline has been enabled by default now