|
|
|
@ -457,8 +457,8 @@ Cypress.Commands.add("createTable", (tableName, initialTable) => { |
|
|
|
cy.get(".spectrum-ButtonGroup").contains("Create").click() |
|
|
|
}) |
|
|
|
// Ensure modal has closed and table is created
|
|
|
|
cy.get(".spectrum-Modal").should("not.exist") |
|
|
|
cy.get(".spectrum-Tabs-content", { timeout: 1000 }).should( |
|
|
|
cy.get(".spectrum-Modal", { timeout: 2000 }).should("not.exist") |
|
|
|
cy.get(".spectrum-Tabs-content", { timeout: 2000 }).should( |
|
|
|
"contain", |
|
|
|
tableName |
|
|
|
) |
|
|
|
@ -637,30 +637,29 @@ Cypress.Commands.add( |
|
|
|
(datasourceNames, accessLevelLabel) => { |
|
|
|
cy.contains("Design").click() |
|
|
|
cy.get(".spectrum-Button").contains("Add screen").click({ force: true }) |
|
|
|
cy.get(".spectrum-Modal").within(() => { |
|
|
|
cy.get(".item").contains("Autogenerated screens").click() |
|
|
|
cy.get(".spectrum-Dialog-grid").within(() => { |
|
|
|
cy.get("[data-cy='autogenerated-screens']").click() |
|
|
|
cy.get(".spectrum-Button").contains("Continue").click({ force: true }) |
|
|
|
}) |
|
|
|
cy.get(".spectrum-Modal [data-cy='data-source-modal']", { |
|
|
|
timeout: 500, |
|
|
|
}).within(() => { |
|
|
|
cy.get("[data-cy='autogenerated-screens']").should("not.exist") |
|
|
|
cy.get("[data-cy='data-source-modal']", { timeout: 10000 }).within(() => { |
|
|
|
for (let i = 0; i < datasourceNames.length; i++) { |
|
|
|
cy.wait(500) |
|
|
|
cy.get(".data-source-entry").contains(datasourceNames[i]).click() |
|
|
|
//Ensure the check mark is visible
|
|
|
|
cy.get(".data-source-entry") |
|
|
|
.contains(datasourceNames[i], { timeout: 20000 }) |
|
|
|
.click({ force: true }) |
|
|
|
// Ensure the check mark is visible
|
|
|
|
cy.get(".data-source-entry") |
|
|
|
.contains(datasourceNames[i]) |
|
|
|
.get(".data-source-check") |
|
|
|
.get(".data-source-check", { timeout: 20000 }) |
|
|
|
.should("exist") |
|
|
|
} |
|
|
|
|
|
|
|
cy.get(".spectrum-Button").contains("Confirm").click({ force: true }) |
|
|
|
}) |
|
|
|
|
|
|
|
cy.get(".spectrum-Modal").within(() => { |
|
|
|
cy.get(".spectrum-Modal", { timeout: 10000 }).within(() => { |
|
|
|
if (accessLevelLabel) { |
|
|
|
cy.get(".spectrum-Picker-label").click() |
|
|
|
cy.wait(500) |
|
|
|
cy.get(".spectrum-Picker-label", { timeout: 10000 }).click() |
|
|
|
cy.contains(accessLevelLabel).click() |
|
|
|
} |
|
|
|
cy.get(".spectrum-Button").contains("Done").click({ force: true }) |
|
|
|
@ -915,8 +914,9 @@ Cypress.Commands.add("createRestQuery", (method, restUrl, queryPrettyName) => { |
|
|
|
Cypress.Commands.add("closeModal", () => { |
|
|
|
cy.get(".spectrum-Modal", { timeout: 2000 }).within(() => { |
|
|
|
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", () => { |
|
|
|
|