|
|
|
@ -543,15 +543,22 @@ Cypress.Commands.add("addCustomSourceOptions", totalOptions => { |
|
|
|
// DESIGN SECTION
|
|
|
|
Cypress.Commands.add("searchAndAddComponent", component => { |
|
|
|
// Open component menu
|
|
|
|
cy.get(".spectrum-Button").contains("Component").click({ force: true }) |
|
|
|
|
|
|
|
// Search and add component
|
|
|
|
cy.wait(500) |
|
|
|
cy.get(".spectrum-Textfield-input").clear().type(component) |
|
|
|
cy.get(".body").within(() => { |
|
|
|
cy.get(".component") |
|
|
|
.contains(new RegExp("^" + component + "$"), { timeout: 3000 }) |
|
|
|
.click({ force: true }) |
|
|
|
cy.get(".icon-side-nav").within(() => { |
|
|
|
cy.get(".icon-side-nav-item").eq(1).click() |
|
|
|
}) |
|
|
|
cy.get(".add-component > .spectrum-Button") |
|
|
|
.contains("Add component") |
|
|
|
.click({ force: true }) |
|
|
|
cy.get(".container", { timeout: 1000 }).within(() => { |
|
|
|
cy.get(".title").should("contain", "Add component") |
|
|
|
|
|
|
|
// Search and add component
|
|
|
|
cy.get(".spectrum-Textfield-input").clear().type(component) |
|
|
|
cy.get(".body").within(() => { |
|
|
|
cy.get(".component") |
|
|
|
.contains(new RegExp("^" + component + "$"), { timeout: 3000 }) |
|
|
|
.click({ force: true }) |
|
|
|
}) |
|
|
|
}) |
|
|
|
cy.wait(1000) |
|
|
|
cy.location().then(loc => { |
|
|
|
@ -597,7 +604,7 @@ Cypress.Commands.add("getComponent", componentId => { |
|
|
|
Cypress.Commands.add("createScreen", (route, accessLevelLabel) => { |
|
|
|
// Blank Screen
|
|
|
|
cy.contains("Design").click() |
|
|
|
cy.get(".header > .add-button").click() |
|
|
|
cy.get(".spectrum-Button").contains("Add screen").click({ force: true }) |
|
|
|
cy.get(".spectrum-Modal").within(() => { |
|
|
|
cy.get("[data-cy='blank-screen']").click() |
|
|
|
cy.get(".spectrum-Button").contains("Continue").click({ force: true }) |
|
|
|
@ -622,7 +629,7 @@ Cypress.Commands.add( |
|
|
|
"createDatasourceScreen", |
|
|
|
(datasourceNames, accessLevelLabel) => { |
|
|
|
cy.contains("Design").click() |
|
|
|
cy.get(".header > .add-button").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-Button").contains("Continue").click({ force: true }) |
|
|
|
@ -742,7 +749,7 @@ Cypress.Commands.add("navigateToDataSection", () => { |
|
|
|
Cypress.Commands.add("navigateToAutogeneratedModal", () => { |
|
|
|
// Screen name must already exist within data source
|
|
|
|
cy.contains("Design").click() |
|
|
|
cy.get(".header > .add-button").click() |
|
|
|
cy.get(".spectrum-Button").contains("Add screen").click({ force: true }) |
|
|
|
cy.get(".spectrum-Modal").within(() => { |
|
|
|
cy.get(".item", { timeout: 2000 }) |
|
|
|
.contains("Autogenerated screens") |
|
|
|
|