projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
19836: Test tweaking.
[arvados-workbench2.git]
/
cypress
/
support
/
commands.js
diff --git
a/cypress/support/commands.js
b/cypress/support/commands.js
index e98000fc71403462a2f67ffbb0008c804da5c4b0..f09d959b8fe9ac6ec35b36f35bde9e7aa36799c2 100644
(file)
--- a/
cypress/support/commands.js
+++ b/
cypress/support/commands.js
@@
-387,9
+387,11
@@
Cypress.Commands.add(
{
prevSubject: 'element',
},
{
prevSubject: 'element',
},
- (subject, file, fileName) => {
+ (subject, file, fileName
, binaryMode = true
) => {
cy.window().then(window => {
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', {
const testFile = new window.File([blob], fileName);
cy.wrap(subject).trigger('drop', {