-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Migrating something to use this gem—which I am so thankful exists—and for no good reason, my baseUrl was not /, so my initial cypress.json was like this:
{
"baseUrl": "http://localhost:3000/foo"
}bin/rails cypress:init did not change that value, but when I run bin/rails cypress:run, my guess is that the "use some random port to run the rails app" does this by setting baseUrl to http://localhost:«that random port», thus making my tests fail. They use cy.visit("/") and were requesting / and not /foo, which is what the baseUrl should've been sending them to (note the tests worked if I ran rails on its own and did cypress run).
I changed all my cy.visit("/") to cy.visit("/foo"), and everything worked (and I should've done that anyway), but I guess what was surprising was that this gem means I cannot set baseUrl any longer. I think that is fine behavior, but maybe should be documented and/or output in some sort of log?
If agreed, I can fork the README and write what would've made this not surprising to me, but wanted to confirm that behavior first.