I'm trying to use cypress to cover our dev-server by a set of complete e2e tests. We have a requirement to lock our dev environment under basic http authentication so nobody couldn't access it without proper credentials (both client and api). When I'm trying to run Cypress tests they fail because of that. Server (nginx) just responds with 401 http-code. I tried to pass credentials in url like 'user:password@domain.com', and it partially works: cypress is able to reach frontend on domain.com, but it's still unable to send any requests to our backend (api.domain.com) from within the page (using fetch) - probably because of different subdomain or smth.
I'm looking for a way for forcing it to use those credentials on all requests on a domain or any other workaround that may help me run the tests.
Thanks!
Aucun commentaire:
Enregistrer un commentaire