From a4fe1eb4dd291908f6f8b6acd67777818b1fc66c Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 27 Jan 2021 13:01:20 +0100 Subject: [PATCH] fix cypress test --- packages/webapp/cypress/integration/intergration.spec.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/webapp/cypress/integration/intergration.spec.js b/packages/webapp/cypress/integration/intergration.spec.js index 232f4ca7..061eb6fc 100644 --- a/packages/webapp/cypress/integration/intergration.spec.js +++ b/packages/webapp/cypress/integration/intergration.spec.js @@ -12,12 +12,12 @@ context("Skynet", () => { }); it("should be able to upload a file", () => { - cy.server(); - cy.route("POST", "/skynet/skyfile").as("upload"); + cy.intercept("POST", "/skynet/skyfile").as("upload"); const fileName = "check.json"; - cy.get('.home-upload input[type="file"]').attachFile(fileName); + cy.wait(1000); // delay for drag-and-drop to work properly every time + cy.get('.home-upload input[type="file"]').attachFile(fileName, { subjectType: 'drag-n-drop' }); cy.get(".home-upload").scrollIntoView(); cy.get(".home-uploaded-files").children().should("have.length", 1); @@ -32,7 +32,6 @@ context("Skynet", () => { cy.contains("Copy Link").click(); cy.contains("Copied!").should("be.visible"); - cy.contains("Copied!").should("not.be.visible"); }); }); });