chromeWebSecurity is not working in Cypress

Viewed 1013

I've tried to test login by google. And get an error "Cypress detected a cross origin error happened on page load". This is m test code. Before getting input[name="identifier"] element I see this error.

Code of my test:

cy.visit(`https://app.develop.weeek.net/sign-in`);

cy.get('.socials__social')
  .eq(0)
  .click();

cy.get('input[name="identifier"]')
  .type(Cypress.env.TEST_GOOGE_EMAIL)
  .should('have.value', Cypress.env.TEST_GOOGE_EMAIL);

I've tried all the ways to turn off checking CORS-requests for Chrome. But no one is working. I open cypress by cypress open --config chromeWebSecurity=false command.

My cypress.json:

{
  "chromeWebSecurity": false,
  "viewportWidth": 1280,
  "viewportHeight": 768
}

Why chromeWebSecurity is not working? How to turn off the CORS checking?

0 Answers
Related