At the moment, I am using a beforeEach()
function to log Cypress in before each test. However, this setup is causing some delays. Is there a way for me to keep the user logged in between tests?
My main objective is to navigate through all the pages as the logged-in user and identify any console warnings or errors.
Sample Code:
describe('Candidate Pages', () => {
beforeEach(() => cy.loginByCognito(Cypress.env("candidate_username"), Cypress.env("candidate_password")));
candidateRoutes.forEach((page) => {
it(`No Console Errors for ${page}`, () => checkConsole(page, "error"));
it(`No console.warn for ${page}`, () => checkConsole(page, "warn"));
});
});