cy.session: Support IndexedDB
See original GitHub issueWhat would you like?
The new cy.session
API currently doesn’t do anything with indexeddb. Is that likely to be supported in the future?
Why is this needed?
I’m testing an app that stores significants amounts of data in indexeddb to support offline use.
In the app, when a users choses to “Go Offline,” data is downloaded from the server to indexeddb. I would like to cache/restore that data with cy.session
so that each tests for offline functionality doesn’t have to re-download that data.
Other
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:7
Top Results From Across the Web
session - Cypress Documentation
The cy.session() command will inherit the testIsolation value to determine whether or not the page is cleared when caching and restoring the browser...
Read more >How open connection with indexedDB for Cypress tests?
The IndexedDB can be manipulated easily from Cypress by using localforage package. I'm using it to set things like the access_token inside ...
Read more >Cypress testing your IndexedDb contents with ... - This Dot Labs
IndexedDb is a browser API for storing significant amounts of structured data locally. It is very useful when you are working on a...
Read more >cypress-io/cypress - Gitter
Hi guys, I would like to create a custom command to my cypress/support/commands.js file to login before each test. The problem is I...
Read more >paramètres des témoins - Stripe
Remembers whether you dismissed a notice on support.stripe.com. ... Session cookie used by splashthat for identification of visitors to event marketing ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found a workaround to circumvent this: You can store the contents of the
IndexedDB
in localstorage in thesetup()
function, and then restore them on thevalidate()
function. TheexportIDB
andimportIDB
functions use the utilities provided by this gist: https://gist.github.com/loilo/ed43739361ec718129a15ae5d531095bThis is brilliant! Will give it a try. Thanks for sharing!