X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d1c2611350e47527730f6d3b226b998abf15a607..e186e23688c92f91e4cbf564dee5018789e0b8ad:/cypress/support/commands.js diff --git a/cypress/support/commands.js b/cypress/support/commands.js index e98000fc71..f09d959b8f 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -387,9 +387,11 @@ Cypress.Commands.add( { prevSubject: 'element', }, - (subject, file, fileName) => { + (subject, file, fileName, binaryMode = true) => { cy.window().then(window => { - const blob = b64toBlob(file, '', 512); + const blob = binaryMode + ? b64toBlob(file, '', 512) + : new Blob([file], {type: 'text/plain'}); const testFile = new window.File([blob], fileName); cy.wrap(subject).trigger('drop', {