jaredpalmer / cypress-image-snapshot

Catch visual regressions in Cypress
MIT License
882 stars 160 forks source link

Failure Threshold ENV variable or ENV var for config file #241

Open YoungElPaso opened 2 years ago

YoungElPaso commented 2 years ago

It would be pretty useful to be able to alter the failure threshold configuration via env variable, so for instance you could force failure to generate new snapshots or just use a harsher threshold on the fly when spot checking some component or another.

An alternative and perhaps better, more flexible approach would be to have different configuration files that could be selected, again via env variable. This might be useful for the above mentioned use case as well as having harsher checks per CI gate or other workflow or condition (dev vs prod etc).

YoungElPaso commented 2 years ago

I realized this is easily done in the default commands.js file so this could be closed (since anyone can do it), or easily incorporated into the default and docs provided by this package. 🤷‍♂️