Closed rwindt closed 3 years ago
To reproduce this doesn't require having a baseUrl
set. This behavior change was introduced in 5.4.0 in https://github.com/cypress-io/cypress/pull/8630 cc @sainthkh
Issue present: https://github.com/cypress-io/cypress/commit/b86b26e1b6014a380e42b6e5d80d7ec2974db0dc Issue not present: https://github.com/cypress-io/cypress/commit/d28676c43eb341aff38adfe2ccbef4253b4ba95a
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/')
})
The code for this is done in cypress-io/cypress#9373, but has yet to be released. We'll update this issue and reference the changelog when it's released.
Very nice! And what a speed, keep up the good work!
Released in 6.1.0
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v6.1.0, please open a new issue.
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 https://github.com/cypress-io/cypress/issues/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