-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimentalSessionSupport
breaks shareAcrossSpecs
#36
Comments
Maybe this is not quite true, I see in the code that |
OK, I think I see. I was trying out a hard reload, which I saw you do in one of your videos. This does seem to clear out |
Hard reload is same as loading a different spec and should load the value from the plug-in space. If it does not, it’s a bug
…Sent from my iPhone
On Dec 14, 2021, at 22:17, Ian VanSchooten ***@***.***> wrote:
OK, I think I see. I was trying out a hard reload, which I saw you do in one of your videos. This does seem to clear out Cypress.env(), which forces setup() to run again. Is that intentional, or maybe a bug?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I think it does load the saved value, but not the timestamp that is saved into |
Ohh could be!
…Sent from my iPhone
On Dec 14, 2021, at 22:32, Ian VanSchooten ***@***.***> wrote:
I think it does load the saved value, but not the timestamp that is saved into Cypress.env(). So, since it cannot find a timestamp, it runs setup() again, which in my case causes an error if it has already run.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hey @IanVS can you create a simple reproducible example showing the problem? I have checked the spec https://github.com/bahmutov/cypress-data-session/blob/main/cypress/integration/dependent-shared.js that has shared value with a dependent session, and that does have the timestamps correctly handled. |
I don't have any dependent sessions. I'll try to make a test, though. 👍 |
I've opened #37 with an example of what I'm seeing. |
🎉 This issue has been resolved in version 1.13.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Great, my tests are passing now with the new version. Thanks for the fix! |
It took me a long time of scratching my head to realize that my specs were recomputing and failing because
shareAcrossSpecs
was not working correctly, due to havingexperimentalSessionSupport
enabled, which clears the Cypress.env before each test, while cypress-data-session relies on that cache to store the results.I think it would be good to throw a clear error if it's detected that
experimentalSessionSupport
is enabled andshareAcrossSpecs
is set as well.The text was updated successfully, but these errors were encountered: