diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 651ff7eabe..e7f753fdb0 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -637,21 +637,20 @@ 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: 20000, - }).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.get(".data-source-entry", { timeout: 10000 }) - .contains(datasourceNames[i], { timeout: 10000 }) - .click({ force: true }) - //Ensure the check mark is visible cy.get(".data-source-entry") - .contains(datasourceNames[i], { timeout: 10000 }) - .get(".data-source-check", { timeout: 10000 }) + .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", { timeout: 20000 }) .should("exist") }