1
0
Fork 0
mirror of synced 2024-09-19 10:48:30 +12:00
budibase/packages/builder/cypress/integration/datasources/incorrectExternalDatasourceConfig.spec.js
Mitch-Budibase 8780010926 New Tests (User Roles, Query Level Transformers, Data Sources etc.)
New tests:
-Query Level Transformers
-Table pagination
-User Roles
-Data Sources (correct config, incorrect config, Wizard)

Also:
-New Commands to support
Testing
-Cypress Updated
2021-11-15 15:25:58 +00:00

29 lines
977 B
JavaScript

context("Incorrect Datasource Configuration", () => {
before(() => {
cy.login()
cy.createTestApp()
})
it("should add incorrect config for PostgreSQL", () => {
// This test tries to fetch immediately after selecting the datasource
// No config is entered (default values used)
// Select PostgreSQL datasource
cy.selectExternalDatasource("PostgreSQL")
// Attempt to fetch tables without applying config
cy.get(".spectrum-Dialog-grid").within(() => {
cy.get(".spectrum-Button").contains(
"Fetch tables from database").click({ force: true })
})
// Wait 2 seconds then assert Modal has not closed
// Modal will not close if config is incorrect
cy.wait(2000)
cy.get(".spectrum-Dialog-grid").should('be.visible')
// Close the modal
cy.get(".spectrum-Dialog-grid").within(() => {
cy.get(".close-icon").click()
})
})
})