Adding delay to cypress test to allow time for statistics to calculate.

This commit is contained in:
mike12345567 2021-02-16 22:12:58 +00:00
parent 2849ccb4b9
commit 1930957553
2 changed files with 4 additions and 2 deletions

View File

@ -53,6 +53,7 @@ context("Create a View", () => {
cy.wait(50)
cy.get(".menu-container").find("select").eq(1).select("age")
cy.contains("Save").click()
cy.wait(100)
cy.get(".ag-center-cols-viewport").scrollTo("100%")
cy.get("[data-cy=table-header]").then($headers => {
expect($headers).to.have.length(7)
@ -65,7 +66,6 @@ context("Create a View", () => {
let values = Array.from($values).map(header =>
header.textContent.trim()
)
values = values.filter(value => value !== "")
expect(values).to.deep.eq([ '31', '5347', '5', '49', '20', '155', 'age' ])
})
})

View File

@ -30,7 +30,9 @@
Object.keys(viewTable.schema).filter(
field =>
view.calculation === "count" ||
viewTable.schema[field].type === "number"
// don't want to perform calculations based on auto ID
(viewTable.schema[field].type === "number" &&
!viewTable.schema[field].autocolumn)
)
function saveView() {