-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A forward slash '/' is stripped from the query paramaters on the request #9360
Comments
To reproduce this doesn't require having a Issue present: b86b26e it('request slash', () => {
cy.visit('index.html')
// requests to /pageOne?param1=/param/ in 5.3.0
// requests to /pageOne?param1=/param in 5.4.0+
cy.request('/pageOne?param1=/param/')
}) 5.3.05.4.0 |
The code for this is done in cypress-io/cypress#9373, but has yet to be released. |
Very nice! And what a speed, keep up the good work! |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
When using
cy.request()
for a path without a hostname the trailing/
is deleted from the query parameters. In test we use, we have abaseUrl
, and per test we add the path.For example we have defined the
baseUrl
www.test.url
(please use a working url, this is only used as an example) and in the test we havecy.request('/pageOne?param1=/param/')
then the following is executed in Cypressrequest GET 200 http://www.test.url/pageOne?param1=/param
. The last/
is deleted. This test started to fail since the introduction of Cypress 5.4.0, I think it could be related to this issue #2101Desired behavior
Desired behaviour is that the trailing
/
is not deleted from the given path.Test code to reproduce
Do have a baseUrl set.
Versions
Worked on 5.3.0
Started to fail from 5.4.0 onwards
The text was updated successfully, but these errors were encountered: