From c6566cc28241f50b12cc2656f154837b8cf22390 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 1 Oct 2021 12:48:16 +0100 Subject: [PATCH] Add slight delay to make views tests pass --- .../cypress/integration/createView.spec.js | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/packages/builder/cypress/integration/createView.spec.js b/packages/builder/cypress/integration/createView.spec.js index 3aef927e8d..62d0740a39 100644 --- a/packages/builder/cypress/integration/createView.spec.js +++ b/packages/builder/cypress/integration/createView.spec.js @@ -28,11 +28,7 @@ context("Create a View", () => { const headers = Array.from($headers).map(header => header.textContent.trim() ) - expect(removeSpacing(headers)).to.deep.eq([ - "group", - "age", - "rating", - ]) + expect(removeSpacing(headers)).to.deep.eq(["group", "age", "rating"]) }) }) @@ -57,11 +53,12 @@ context("Create a View", () => { }) it("creates a stats calculation view based on age", () => { + cy.wait(1000) cy.contains("Calculate").click() cy.get(".modal-inner-wrapper").within(() => { cy.get(".spectrum-Picker-label").eq(0).click() cy.contains("Statistics").click() - + cy.get(".spectrum-Picker-label").eq(1).click() cy.contains("age").click({ force: true }) @@ -104,20 +101,20 @@ context("Create a View", () => { cy.get(".spectrum-Table-cell").then($values => { let values = Array.from($values).map(header => header.textContent.trim()) expect(values).to.deep.eq([ - "Students", - "70", - "20", - "25", - "3", - "1650", - "23.333333333333332", - "Teachers", - "85", - "36", - "49", - "2", - "3697", - "42.5", + "Students", + "70", + "20", + "25", + "3", + "1650", + "23.333333333333332", + "Teachers", + "85", + "36", + "49", + "2", + "3697", + "42.5", ]) }) })