|
|
|
@ -307,34 +307,41 @@ Cypress.Commands.add("createScreen", (route, accessLevelLabel) => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
Cypress.Commands.add("createDatasourceScreen", (datasourceName, accessLevelLabel) => { |
|
|
|
cy.contains("Design").click() |
|
|
|
cy.get("[aria-label=AddCircle]").click() |
|
|
|
cy.get(".spectrum-Modal").within(() => { |
|
|
|
cy.get(".item").contains("Autogenerated screens").click() |
|
|
|
cy.get(".spectrum-Button").contains("Continue").click({ force: true }) |
|
|
|
cy.wait(500) |
|
|
|
}) |
|
|
|
cy.get(".spectrum-Modal [data-cy='data-source-modal']").within(() => { |
|
|
|
cy.get(".data-source-entry").contains(datasourceName).should("exist") |
|
|
|
cy.get(".data-source-entry").contains(datasourceName).click({ force: true }) |
|
|
|
|
|
|
|
cy.get(".data-source-entry").contains(datasourceName).get(".data-source-check").should("exist") |
|
|
|
cy.get(".spectrum-Button").contains("Confirm").click({ force: true }) |
|
|
|
}) |
|
|
|
|
|
|
|
cy.get(".spectrum-Modal").within(() => { |
|
|
|
if (accessLevelLabel) { |
|
|
|
cy.get(".spectrum-Picker-label").click() |
|
|
|
Cypress.Commands.add( |
|
|
|
"createDatasourceScreen", |
|
|
|
(datasourceName, accessLevelLabel) => { |
|
|
|
cy.contains("Design").click() |
|
|
|
cy.get("[aria-label=AddCircle]").click() |
|
|
|
cy.get(".spectrum-Modal").within(() => { |
|
|
|
cy.get(".item").contains("Autogenerated screens").click() |
|
|
|
cy.get(".spectrum-Button").contains("Continue").click({ force: true }) |
|
|
|
cy.wait(500) |
|
|
|
cy.contains(accessLevelLabel).click() |
|
|
|
} |
|
|
|
cy.get(".spectrum-Button").contains("Done").click({ force: true }) |
|
|
|
}) |
|
|
|
}) |
|
|
|
cy.get(".spectrum-Modal [data-cy='data-source-modal']").within(() => { |
|
|
|
cy.get(".data-source-entry").contains(datasourceName).should("exist") |
|
|
|
cy.get(".data-source-entry") |
|
|
|
.contains(datasourceName) |
|
|
|
.click({ force: true }) |
|
|
|
|
|
|
|
cy.contains("Design").click() |
|
|
|
}) |
|
|
|
cy.get(".data-source-entry") |
|
|
|
.contains(datasourceName) |
|
|
|
.get(".data-source-check") |
|
|
|
.should("exist") |
|
|
|
cy.get(".spectrum-Button").contains("Confirm").click({ force: true }) |
|
|
|
}) |
|
|
|
|
|
|
|
cy.get(".spectrum-Modal").within(() => { |
|
|
|
if (accessLevelLabel) { |
|
|
|
cy.get(".spectrum-Picker-label").click() |
|
|
|
cy.wait(500) |
|
|
|
cy.contains(accessLevelLabel).click() |
|
|
|
} |
|
|
|
cy.get(".spectrum-Button").contains("Done").click({ force: true }) |
|
|
|
}) |
|
|
|
|
|
|
|
cy.contains("Design").click() |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
Cypress.Commands.add("navigateToAutogeneratedModal", () => { |
|
|
|
// Screen name must already exist within data source
|
|
|
|
|