-
Notifications
You must be signed in to change notification settings - Fork 3
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
Playback file is not created when the command cy.reload() is used in the test #123
Comments
Hi @alaney, thanks for the report. I can reproduce what you're seeing as well, something with the We'll take a look, thanks! |
Sorry it took so long to look at this issue. This is looking to be an interesting challenge, let me explain what I believe is going on:
I'm going to look deeper in Cypress to see if it is possible to be notified of cancelled requests. Until then, you may want to add code to the test to ensure it is "stable" (meaning the inflight requests the plugin is waiting on are complete) prior to triggering the reload. |
Thanks for the feedback. I can work with that 🙂 |
Hi @DigTheDoug, Any news about this issue? |
Hey sorry @malibagci no updates on this issue. It's a bit more of a complex one and we haven't had time to look at it. PRs always welcome if you or anyone else has any ideas or thoughts though. @tvsbrent 's comment above covers the gist of it, specifically the last bullet point:
If you know of a way to hook into knowing when a reload is triggered in Cypress or when there are cancelled requests that might be where the library could interrupt to save the snapshot. |
Describe the bug
I have a spec where I reload the page using
cy.reload()
. The test is expecting the page to be in the same state after a page reload. When I run the spec, no playback file is created. If I simply remove the reload command, the playback file is successfully created. The command log shows that there is "one pending request" when I use thereload
command. I only have one matcher and it works just fine without the reload.To Reproduce
I have tried to reproduce this using another site like Google but I was unsuccessful. I'm wondering if you know of any reason that this may happen? Here's an idea of what my test looks like:
Expected behavior
The matcher should have recorded the requests and a playback file should be created.
Environment
The text was updated successfully, but these errors were encountered: