17500: Avoids multi-slash URLs usage.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Fri, 16 Apr 2021 20:20:12 +0000 (17:20 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Fri, 16 Apr 2021 20:20:45 +0000 (17:20 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>

cypress/support/commands.js

index 8dc003fee1288f8b10cd76ec8bee7d27f1a17fc8..2a7f350ae90e5a16b717f2a99aa72a6066af5c09 100644 (file)
@@ -36,7 +36,7 @@ Cypress.Commands.add(
         token = systemToken, auth = false, followRedirect = true) => {
     return cy.request({
         method: method,
-        url: `${controllerURL}/${path}`,
+        url: `${controllerURL.replace(/\/+$/, '')}/${path.replace(/^\/+/, '')}`,
         body: data,
         qs: auth ? qs : Object.assign({ api_token: token }, qs),
         auth: auth ? { bearer: `${token}` } : undefined,