From 4a9e24508c487f701d8dfa7c43643656b9c91f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 23 Jun 2023 08:32:33 +0200 Subject: [PATCH] debug: cypress failure on upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- cypress/support/commands.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 56c1996a690..1ccd43fd32b 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -61,8 +61,11 @@ Cypress.Commands.add('uploadFile', (fileName, mimeType, target) => { fileName = target } return cy.request('/csrftoken') - .then(({ body }) => body.token) + .then(({ body }) => { + return cy.wrap(body.token) + }) .then(requesttoken => { + cy.wait(1000) return axios.put(`${url}/remote.php/webdav/${fileName}`, file, { headers: { requesttoken,