Add slight delay to make views tests pass

This commit is contained in:
Andrew Kingston 2021-10-01 12:48:16 +01:00
parent 305d82846b
commit c6566cc282
1 changed files with 17 additions and 20 deletions

View File

@ -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,6 +53,7 @@ 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()
@ -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",
])
})
})