cy.visit('/something') isn't working when ran within CI
codinghedgehog-python opened this issue · 1 comments
codinghedgehog-python commented
I'm using this repo to learn how to connect Cypress to a service created using docker-compose
.
{
1 "baseUrl": "http://nginx:80",
2 "video": false
3 }
cy.visit('/')
works fine within GitLab CI but when Cypress tries to access other routes such as cy.visit('/register')
it gives me 404.
CypressError: `cy.visit()` failed trying to load:
http://nginx:80/register
The response we received from your web server was:
> 404: Not Found
Can you expand on this ?
userdansilva commented
I have the same issue. In my case I am using httpd for web, this error happens because you need to configure your webserver which serves your "index.html" to accept subpages. I don't know yet how it's done, but I'll come back later as soon as I figure it out.