17500: Avoids multi-slash URLs usage.
[arvados-workbench2.git] / 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,