Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SECURITY SOLUTION] Upgrades cypress to v5 #76002

Merged
merged 6 commits into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"copy-to-clipboard": "^3.0.8",
"copy-webpack-plugin": "^6.0.2",
"cronstrue": "^1.51.0",
"cypress": "4.11.0",
"cypress": "5.0.0",
"cypress-multi-reporters": "^1.2.3",
"d3": "3.5.17",
"d3-scale": "1.0.7",
Expand Down
18 changes: 9 additions & 9 deletions x-pack/plugins/security_solution/cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*

* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
Expand Down Expand Up @@ -45,15 +46,14 @@ Cypress.Commands.add(
prevSubject: 'element',
},
(input, fileName, fileType = 'text/plain') => {
cy.fixture(fileName)
.then((content) => Cypress.Blob.base64StringToBlob(content, fileType))
.then((blob) => {
const testFile = new File([blob], fileName, { type: fileType });
const dataTransfer = new DataTransfer();
cy.fixture(fileName).then((content) => {
const blob = Cypress.Blob.base64StringToBlob(content, fileType);
const testFile = new File([blob], fileName, { type: fileType });
const dataTransfer = new DataTransfer();

dataTransfer.items.add(testFile);
input[0].files = dataTransfer.files;
return input;
});
dataTransfer.items.add(testFile);
input[0].files = dataTransfer.files;
return input;
});
}
);
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import './commands';

Cypress.Cookies.defaults({
whitelist: 'sid',
preserve: 'sid',
});

Cypress.on('uncaught:exception', (err) => {
Expand Down
Loading