I am using cypress, and I want to disable chromeWebSecurity in test cases, but dont want change cypress config.
before each:
beforeEach('before test', () => {
Cypress.config('chromeWebSecurity',false);
cy.createUser('type').then((response) => {
ssoId = response.id;
phone = response.phone;
});
});
If I add ""chromeWebSecurity": false" in cypress config (cypress.json) - it works, but i dont want disable this in all my test suites.
I’m trying to add "Cypress.config('chromeWebSecurity',false);" before "cy.createUser('type').then((response) => {" in before each like this:
beforeEach('before test', () => {
Cypress.config('chromeWebSecurity',false);
cy.createUser('type').then((response) => {
ssoId = response.id;
phone = response.phone;
});
});
but it doesn’t work