From 43612192a6197f3dfcd0e2585f1ca3796f7c4b4e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2020 14:18:01 +0300 Subject: [PATCH] chore(deps): update dependency cypress-file-upload to v4 (#4164) * chore(deps): update dependency cypress-file-upload to v4 * test(e2e-media-lib): update upload file command usage Co-authored-by: Renovate Bot Co-authored-by: erezrokah --- cypress/integration/common/media_library.js | 10 +--------- package.json | 2 +- yarn.lock | 10 ++++++---- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/cypress/integration/common/media_library.js b/cypress/integration/common/media_library.js index 0e167dcc..86d94ee8 100644 --- a/cypress/integration/common/media_library.js +++ b/cypress/integration/common/media_library.js @@ -1,4 +1,3 @@ -import path from 'path'; import '../../utils/dismiss-local-backup'; import { login, @@ -18,14 +17,7 @@ function uploadMediaFile() { assertNoImagesInLibrary(); const fixture = 'media/netlify.png'; - cy.fixture(fixture).then(fileContent => { - cy.get('input[type="file"]').upload({ - fileContent, - fileName: path.basename(fixture), - mimeType: 'image/png', - }); - }); - + cy.get('input[type="file"]').attachFile(fixture); cy.contains('span', 'Uploading...').should('not.exist'); assertImagesInLibrary(); diff --git a/package.json b/package.json index c0027263..399a70f2 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "cross-env": "^7.0.0", "css-loader": "^3.0.0", "cypress": "^4.6.0", - "cypress-file-upload": "^3.5.1", + "cypress-file-upload": "^4.0.0", "cypress-image-snapshot": "^3.1.1", "cypress-jest-adapter": "^0.1.1", "cypress-plugin-tab": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 9c86779c..f7b2d609 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6612,10 +6612,12 @@ cyclist@^1.0.1: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= -cypress-file-upload@^3.5.1: - version "3.5.3" - resolved "https://registry.yarnpkg.com/cypress-file-upload/-/cypress-file-upload-3.5.3.tgz#cd706485de3fb2cbd4a8c2dd90fe96d537bb4311" - integrity sha512-S/czzqAj1BYz6Xxnfpx2aSc6hXsj76fd8/iuycJ2RxoxCcQMliw8eQV0ugzVlkzr1GD5dKGviNFGYqv3nRJ+Tg== +cypress-file-upload@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/cypress-file-upload/-/cypress-file-upload-4.0.7.tgz#1136139bb3c660b9c39a69f231ac1da7785acaae" + integrity sha512-rFFmnoZ2bWyWFpSV09AhkSUgYEiVy70pcQ6nf/mGTMTrVHvKCCCIfRu3TbgVYHbgBq+0hqjfjQrtz4IbgH7qZA== + dependencies: + mime "^2.4.4" cypress-image-snapshot@^3.1.1: version "3.1.1"