Cypress: PostgreSql and createTable Changes
PostgreSql - Added intercept when saving a query, sometimes it runs too fast createTable command - Improved to ensure better timing, and that table is correctly created
This commit is contained in:
parent
d4033c8fd4
commit
8232f28885
2 changed files with 8 additions and 1 deletions
|
@ -150,7 +150,9 @@ filterTests(["all"], () => {
|
||||||
cy.get("@query").its("response.statusCode").should("eq", 200)
|
cy.get("@query").its("response.statusCode").should("eq", 200)
|
||||||
cy.get("@query").its("response.body").should("not.be.empty")
|
cy.get("@query").its("response.body").should("not.be.empty")
|
||||||
// Save query
|
// Save query
|
||||||
|
cy.intercept("**/queries").as("saveQuery")
|
||||||
cy.get(".spectrum-Button").contains("Save Query").click({ force: true })
|
cy.get(".spectrum-Button").contains("Save Query").click({ force: true })
|
||||||
|
cy.wait("@saveQuery")
|
||||||
cy.get(".spectrum-Tabs-content", { timeout: 2000 }).should("contain", queryName)
|
cy.get(".spectrum-Tabs-content", { timeout: 2000 }).should("contain", queryName)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -422,7 +422,12 @@ Cypress.Commands.add("createTable", (tableName, initialTable) => {
|
||||||
cy.get("input", { timeout: 2000 }).first().type(tableName).blur()
|
cy.get("input", { timeout: 2000 }).first().type(tableName).blur()
|
||||||
cy.get(".spectrum-ButtonGroup").contains("Create").click()
|
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", () => {
|
Cypress.Commands.add("createTestTableWithData", () => {
|
||||||
|
|
Loading…
Reference in a new issue