Skip to content

Commit

Permalink
debug: cypress failure on upload
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Jun 23, 2023
1 parent 270b21b commit 4a9e245
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check failure on line 68 in cypress/support/commands.js

View workflow job for this annotation

GitHub Actions / eslint

Do not wait for arbitrary time periods
return axios.put(`${url}/remote.php/webdav/${fileName}`, file, {
headers: {
requesttoken,
Expand Down

0 comments on commit 4a9e245

Please sign in to comment.