using @mocks-server/cypress-command when running cypress in docker fails:
spec file:
// fails
cy.mocksUseRouteVariant("get-user:failure");
// works
cy.request(`http://${Cypress.env("MOCKS_SERVER_ADMIN_API_HOST")}:3110/api/mock/routes`).then((response) => {
cy.log(response.body);
});
so the cy.mocksUseRouteVariant("get-user:failure"); fails
where as the cy.request with the same values seems to work.
log [Mocks Server] Error trying to set route variant 'get-user: failure', Error: Network request failed
log [Mocks Server] You should check if the Admin API is listening on http://mocks-server:3110
To Reproduce
docker-compose file with 2 services.
mocks-server
cypress
a spec file in cypress container that tries to set a custom route
using @mocks-server/cypress-command when running cypress in docker fails:
spec file:
so the
cy.mocksUseRouteVariant("get-user:failure");
fails where as the cy.request with the same values seems to work.To Reproduce docker-compose file with 2 services. mocks-server cypress
a spec file in cypress container that tries to set a custom route
Expected behavior the custom route command works.