From 43f20ef46319319876bd1acb0c77da5a38bb7473 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 11 Mar 2020 10:47:25 +0100 Subject: [PATCH] improve integration test reliability --- cypress/integration/intergration.spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cypress/integration/intergration.spec.js b/cypress/integration/intergration.spec.js index c1d5bdb2..487d1176 100644 --- a/cypress/integration/intergration.spec.js +++ b/cypress/integration/intergration.spec.js @@ -12,6 +12,9 @@ context("Skynet", () => { }); it("should be able to upload a file", () => { + cy.server(); + cy.route("POST", "/skynet/skyfile").as("upload"); + const fileName = "check.json"; cy.fixture(fileName).then((fileContent) => { @@ -21,6 +24,9 @@ context("Skynet", () => { cy.get(".home-uploaded-files") .children() .should("have.length", 1); + + cy.wait("@upload"); + cy.contains(".upload-file", fileName).within(() => { cy.get(".url") .invoke("text")