1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +12:00

Merge pull request #6906 from Budibase/cypress-testing

Cypress: PostgreSql and createTable Changes
This commit is contained in:
Mitch-Budibase 2022-07-26 20:32:53 +01:00 committed by GitHub
commit 0d4544e443
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -150,7 +150,9 @@ filterTests(["all"], () => {
cy.get("@query").its("response.statusCode").should("eq", 200)
cy.get("@query").its("response.body").should("not.be.empty")
// Save query
cy.intercept("**/queries").as("saveQuery")
cy.get(".spectrum-Button").contains("Save Query").click({ force: true })
cy.wait("@saveQuery")
cy.get(".spectrum-Tabs-content", { timeout: 2000 }).should("contain", queryName)
})

View file

@ -422,7 +422,12 @@ Cypress.Commands.add("createTable", (tableName, initialTable) => {
cy.get("input", { timeout: 2000 }).first().type(tableName).blur()
cy.get(".spectrum-ButtonGroup").contains("Create").click()
})
cy.contains(tableName).should("be.visible")
// Ensure modal has closed and table is created
cy.get(".spectrum-Modal").should("not.exist")
cy.get(".spectrum-Tabs-content", { timeout: 1000 }).should(
"contain",
tableName
)
})
Cypress.Commands.add("createTestTableWithData", () => {