The following facts:
To step 3: If I only use the command 'cy.visit('X);' then Cypress clears the cache and my customisations are lost.
I know that there is a command 'Cypress.LocalStorage', but I don't know how exactly to use it for my case.
Thanks for your help!
I have found a second solution for my problem. I added at the beginning of my test case (in describe, bevor it) this:
beforeEach(() => {
cy.restoreLocalStorage().then(() => {
cy.log('Storage restored');
})
});
afterEach(() => {
cy.saveLocalStorage().then(() => {
cy.log('Storage saved');
})
});
I hope I can help you with it! Let me know it!