eWert-Online / OSnap

OSnap is a snapshot testing tool, which mainly focuses on speed and ease of use.
https://ewert-online.github.io/OSnap/
152 stars 2 forks source link

Headless browser maintains cookies between snapshots #20

Closed kevin-j-morse closed 2 years ago

kevin-j-morse commented 2 years ago

I have a web application that I'm trying to visually diff using OSnap.

All pages are replaced with a login page for unauthenticated users. Depending on the order that tests are run, this tool doesn't require login for many of the tests which suggests that client state is being preserved between snapshots.

I think calling Storage.clearCookies on the browser before starting each test would address this issue. One could go further and clear the cache but I expect this would have a detrimental performance on the tests and is not reflective of a real world situation.

eWert-Online commented 2 years ago

This should now be fixed in the latest nightly version. Would you be able to test this? 🙂