Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
977 B

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()
})
})
})