1
0
Fork 0
mirror of synced 2024-09-10 22:46:09 +12:00

Merge pull request #5965 from Budibase/cypress-testing

Cypres Testing - Datasource fetch table intercept
This commit is contained in:
Mitch-Budibase 2022-05-18 15:43:43 +01:00 committed by GitHub
commit 5f36b957cd

View file

@ -643,13 +643,14 @@ Cypress.Commands.add("addDatasourceConfig", (datasource, skipFetch) => {
.click({ force: true }) .click({ force: true })
}) })
} else { } else {
cy.intercept("**/tables").as("datasourceTables")
cy.get(".spectrum-Dialog-grid").within(() => { cy.get(".spectrum-Dialog-grid").within(() => {
cy.get(".spectrum-Button") cy.get(".spectrum-Button")
.contains("Save and fetch tables") .contains("Save and fetch tables")
.click({ force: true }) .click({ force: true })
// Check modal closes after datasource config & fetch
cy.get(".spectrum-Dialog-grid", { timeout: 7000 }).should("not.exist")
}) })
// Wait for tables to be fetched
cy.wait("@datasourceTables")
} }
}) })