Merge branch 'develop' of github.com:Budibase/budibase into develop
This commit is contained in:
commit
d52347b852
|
@ -74,11 +74,11 @@ filterTests(["smoke", "all"], () => {
|
||||||
.contains("Update role")
|
.contains("Update role")
|
||||||
.click({ force: true })
|
.click({ force: true })
|
||||||
})
|
})
|
||||||
cy.reload({ timeout: 5000 })
|
cy.reload()
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
}
|
}
|
||||||
// Confirm roles exist within Configure roles table
|
// Confirm roles exist within Configure roles table
|
||||||
cy.get(interact.SPECTRUM_TABLE, { timeout: 2000 })
|
cy.get(interact.SPECTRUM_TABLE, { timeout: 20000 })
|
||||||
.eq(0)
|
.eq(0)
|
||||||
.within(assginedRoles => {
|
.within(assginedRoles => {
|
||||||
expect(assginedRoles).to.contain("Admin")
|
expect(assginedRoles).to.contain("Admin")
|
||||||
|
@ -180,7 +180,7 @@ filterTests(["smoke", "all"], () => {
|
||||||
cy.reload()
|
cy.reload()
|
||||||
|
|
||||||
// Confirm details have been saved
|
// Confirm details have been saved
|
||||||
cy.get(interact.FIELD, { timeout: 1000 }).eq(1).within(() => {
|
cy.get(interact.FIELD, { timeout: 20000 }).eq(1).within(() => {
|
||||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', "bb")
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', "bb")
|
||||||
})
|
})
|
||||||
cy.get(interact.FIELD, { timeout: 1000 }).eq(2).within(() => {
|
cy.get(interact.FIELD, { timeout: 1000 }).eq(2).within(() => {
|
||||||
|
|
|
@ -162,7 +162,7 @@ filterTests(["all"], () => {
|
||||||
switchSchema("randomText")
|
switchSchema("randomText")
|
||||||
|
|
||||||
// No tables displayed
|
// No tables displayed
|
||||||
cy.get(".spectrum-Body", { timeout: 20000 }).eq(2).should("contain", "No tables found")
|
cy.get(".spectrum-Body", { timeout: 10000 }).eq(2, { timeout: 10000 }).should("contain", "No tables found")
|
||||||
|
|
||||||
// Previously created query should be visible
|
// Previously created query should be visible
|
||||||
cy.get(".spectrum-Table").should("contain", queryName)
|
cy.get(".spectrum-Table").should("contain", queryName)
|
||||||
|
|
|
@ -14,7 +14,7 @@ filterTests(["smoke", "all"], () => {
|
||||||
// Select REST data source
|
// Select REST data source
|
||||||
cy.selectExternalDatasource(datasource)
|
cy.selectExternalDatasource(datasource)
|
||||||
// Enter incorrect api & attempt to send query
|
// Enter incorrect api & attempt to send query
|
||||||
cy.get(".spectrum-Button", { timeout: 500 }).contains("Add query").click({ force: true })
|
cy.get(".query-buttons", { timeout: 1000 }).contains("Add query").click({ force: true })
|
||||||
cy.intercept("**/preview").as("queryError")
|
cy.intercept("**/preview").as("queryError")
|
||||||
cy.get("input").clear().type("random text")
|
cy.get("input").clear().type("random text")
|
||||||
cy.get(".spectrum-Button").contains("Send").click({ force: true })
|
cy.get(".spectrum-Button").contains("Send").click({ force: true })
|
||||||
|
|
|
@ -457,8 +457,8 @@ Cypress.Commands.add("createTable", (tableName, initialTable) => {
|
||||||
cy.get(".spectrum-ButtonGroup").contains("Create").click()
|
cy.get(".spectrum-ButtonGroup").contains("Create").click()
|
||||||
})
|
})
|
||||||
// Ensure modal has closed and table is created
|
// Ensure modal has closed and table is created
|
||||||
cy.get(".spectrum-Modal").should("not.exist")
|
cy.get(".spectrum-Modal", { timeout: 2000 }).should("not.exist")
|
||||||
cy.get(".spectrum-Tabs-content", { timeout: 1000 }).should(
|
cy.get(".spectrum-Tabs-content", { timeout: 2000 }).should(
|
||||||
"contain",
|
"contain",
|
||||||
tableName
|
tableName
|
||||||
)
|
)
|
||||||
|
@ -637,30 +637,29 @@ Cypress.Commands.add(
|
||||||
(datasourceNames, accessLevelLabel) => {
|
(datasourceNames, accessLevelLabel) => {
|
||||||
cy.contains("Design").click()
|
cy.contains("Design").click()
|
||||||
cy.get(".spectrum-Button").contains("Add screen").click({ force: true })
|
cy.get(".spectrum-Button").contains("Add screen").click({ force: true })
|
||||||
cy.get(".spectrum-Modal").within(() => {
|
cy.get(".spectrum-Dialog-grid").within(() => {
|
||||||
cy.get(".item").contains("Autogenerated screens").click()
|
cy.get("[data-cy='autogenerated-screens']").click()
|
||||||
cy.get(".spectrum-Button").contains("Continue").click({ force: true })
|
cy.get(".spectrum-Button").contains("Continue").click({ force: true })
|
||||||
})
|
})
|
||||||
cy.get(".spectrum-Modal [data-cy='data-source-modal']", {
|
cy.get("[data-cy='autogenerated-screens']").should("not.exist")
|
||||||
timeout: 500,
|
cy.get("[data-cy='data-source-modal']", { timeout: 10000 }).within(() => {
|
||||||
}).within(() => {
|
|
||||||
for (let i = 0; i < datasourceNames.length; i++) {
|
for (let i = 0; i < datasourceNames.length; i++) {
|
||||||
cy.wait(500)
|
cy.get(".data-source-entry")
|
||||||
cy.get(".data-source-entry").contains(datasourceNames[i]).click()
|
.contains(datasourceNames[i], { timeout: 20000 })
|
||||||
//Ensure the check mark is visible
|
.click({ force: true })
|
||||||
|
// Ensure the check mark is visible
|
||||||
cy.get(".data-source-entry")
|
cy.get(".data-source-entry")
|
||||||
.contains(datasourceNames[i])
|
.contains(datasourceNames[i])
|
||||||
.get(".data-source-check")
|
.get(".data-source-check", { timeout: 20000 })
|
||||||
.should("exist")
|
.should("exist")
|
||||||
}
|
}
|
||||||
|
|
||||||
cy.get(".spectrum-Button").contains("Confirm").click({ force: true })
|
cy.get(".spectrum-Button").contains("Confirm").click({ force: true })
|
||||||
})
|
})
|
||||||
|
|
||||||
cy.get(".spectrum-Modal").within(() => {
|
cy.get(".spectrum-Modal", { timeout: 10000 }).within(() => {
|
||||||
if (accessLevelLabel) {
|
if (accessLevelLabel) {
|
||||||
cy.get(".spectrum-Picker-label").click()
|
cy.get(".spectrum-Picker-label", { timeout: 10000 }).click()
|
||||||
cy.wait(500)
|
|
||||||
cy.contains(accessLevelLabel).click()
|
cy.contains(accessLevelLabel).click()
|
||||||
}
|
}
|
||||||
cy.get(".spectrum-Button").contains("Done").click({ force: true })
|
cy.get(".spectrum-Button").contains("Done").click({ force: true })
|
||||||
|
@ -915,8 +914,9 @@ Cypress.Commands.add("createRestQuery", (method, restUrl, queryPrettyName) => {
|
||||||
Cypress.Commands.add("closeModal", () => {
|
Cypress.Commands.add("closeModal", () => {
|
||||||
cy.get(".spectrum-Modal", { timeout: 2000 }).within(() => {
|
cy.get(".spectrum-Modal", { timeout: 2000 }).within(() => {
|
||||||
cy.get(".close-icon").click()
|
cy.get(".close-icon").click()
|
||||||
cy.wait(1000) // Wait for modal to close
|
|
||||||
})
|
})
|
||||||
|
// Confirm modal has closed
|
||||||
|
cy.get(".spectrum-Modal", { timeout: 10000 }).should("not.exist")
|
||||||
})
|
})
|
||||||
|
|
||||||
Cypress.Commands.add("expandBudibaseConnection", () => {
|
Cypress.Commands.add("expandBudibaseConnection", () => {
|
||||||
|
|
Loading…
Reference in New Issue