Is it possible to skip the beforeEach function in my Cypress index.js support file, for a certain spec file (access.spec.js)?
index.js
// This example support/index.js is processed and
// loaded automatically before your test files.
beforeEach(function () {
cy.request('POST', 'https://exampleURL.com', {
email: 'email',
password: 'password'
}).then((response) => {
cy.setCookie('accessToken', response.body.AccessToken);
});
cy.setCookie('email', 'email');
cy.setCookie('environment', '3');
cy.setCookie('name', 'name');
}
access.spec.js
it("it should send user back to login screen when AccessToken is missing", () => {
// Code here
});