Skip to content

Commit f346511

Browse files
committed
fix failing test
1 parent 679aac8 commit f346511

File tree

1 file changed

+9
-9
lines changed
  • x-pack/plugins/security_solution/cypress/support

1 file changed

+9
-9
lines changed

x-pack/plugins/security_solution/cypress/support/commands.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
23
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
34
* or more contributor license agreements. Licensed under the Elastic License;
45
* you may not use this file except in compliance with the Elastic License.
@@ -45,15 +46,14 @@ Cypress.Commands.add(
4546
prevSubject: 'element',
4647
},
4748
(input, fileName, fileType = 'text/plain') => {
48-
cy.fixture(fileName)
49-
.then((content) => Cypress.Blob.base64StringToBlob(content, fileType))
50-
.then((blob) => {
51-
const testFile = new File([blob], fileName, { type: fileType });
52-
const dataTransfer = new DataTransfer();
49+
cy.fixture(fileName).then((content) => {
50+
const blob = Cypress.Blob.base64StringToBlob(content, fileType);
51+
const testFile = new File([blob], fileName, { type: fileType });
52+
const dataTransfer = new DataTransfer();
5353

54-
dataTransfer.items.add(testFile);
55-
input[0].files = dataTransfer.files;
56-
return input;
57-
});
54+
dataTransfer.items.add(testFile);
55+
input[0].files = dataTransfer.files;
56+
return input;
57+
});
5858
}
5959
);

0 commit comments

Comments
 (0)