Skip to content

Commit

Permalink
cypress: Replace obsolete Cypress.Cookies.preserveOnce
Browse files Browse the repository at this point in the history
  • Loading branch information
mamedin committed Sep 28, 2023
1 parent bd31c5e commit 5447ecb
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions cypress/e2e/finding_aid.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,14 @@ describe(
})
})

// Define an array of cookies to preserve
const cookiesToPreserve = ['atom_authenticated', 'symfony'];

beforeEach(() => {
// Use cy.session to preserve cookies and validate them
cy.session(
'unique_identifier',
() => {
// Perform actions here
// ...

// Validate that there are at least some cookies
cy.getCookies().should('exist');
},
// Define options for cy.session, if needed
);
// Use cy.session to preserve all cookies and validate them
cy.session('unique_identifier', cy.login, {
validate () {
cy.getCookies().should('exist')
},
})
});

it('Disables finding aids', () => {
Expand Down

0 comments on commit 5447ecb

Please sign in to comment.