**Cypress 13** has **[session][1] handling**. So you don't need these workarounds from above anymore.
an example:
cy.session(
[user, password],
() => {
cy.visit('/auth/login');
type('#user_name', user);
type('#user_password', password);
cy.get('#user_login_submit').click();
cy.url().should('contain', '/main');
},
{
cacheAcrossSpecs: true,
},
);
[1]: https://docs.cypress.io/api/commands/session
Cypress 13 has [session][1] handling.
as example:
cy.session(
[user, password],
() => {
cy.visit('/auth/login');
type('#user_name', user);
type('#user_password', password);
cy.get('#user_login_submit').click();
cy.url().should('contain', '/first_page_after_login');
},
{
cacheAcrossSpecs: true,
},
);
[1]: https://docs.cypress.io/api/commands/session