cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.66k stars 3.16k forks source link

Issues with baseUrl feature adding trailing slash #29752

Open JChaneyasdf opened 2 months ago

JChaneyasdf commented 2 months ago

Current behavior

The baseUrl feature is appending a slash to the baseUrl, which can cause some websites to disconnect or fail to fire their load event.

Desired behavior

cy.visit('/') should take the user to the baseUrl, not https//baseUrl.com/

Test code to reproduce

Code is company intellectual property. To check this behavior, run any local virtualized server and attempt to visit it using baseUrl and cy.visit('/'). Check your browsers dev console or cypress debug log, and if the issue has been successfully recreated, the site visited will not be baseUrl, but will instead have a slash character appended to the end.

Cypress Version

13.12.0

Node version

20.13.0

Operating System

Windows 11

Debug Logs

No response

Other

No response

jennifer-shehane commented 2 months ago

Related issue: https://github.com/cypress-io/cypress/issues/25554