From 4906dc6337202426d1aba9301fb776cd1f74dcbe Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Tue, 1 Mar 2022 11:49:40 +0000 Subject: [PATCH] Changes for Table test - Commands.js Seems like a potential timing issue for the Create Table test Specifically: -The datasource modal looks to be sometimes delayed when appearing after app creation --increasing wait time for after app creation --Reducing wait within the createTable command --Updating specific ID to use 'data-cy' --Updating another ID for the data source modal I am unable to reproduce this potential issue locally, so making changes in hopes the CI picks it up (if the timing issue still exists) --- packages/builder/cypress/support/commands.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 40fe6706c9..6a8f6799a0 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -39,7 +39,7 @@ Cypress.Commands.add("createApp", name => { cy.get(".spectrum-Modal").within(() => { cy.get("input").eq(0).type(name).should("have.value", name).blur() cy.get(".spectrum-ButtonGroup").contains("Create app").click() - cy.wait(5000) + cy.wait(10000) }) cy.createTable("Cypress Tests", true) }) @@ -116,10 +116,10 @@ Cypress.Commands.add("createTestTableWithData", () => { Cypress.Commands.add("createTable", (tableName, initialTable) => { if (!initialTable) { cy.navigateToDataSection() - cy.get(".add-button").click() + cy.get(`[data-cy="new-table"]`).click() } - cy.wait(7000) - cy.get(".spectrum-Modal") + cy.wait(5000) + cy.get(".spectrum-Dialog-grid") .contains("Budibase DB") .click({ force: true }) .then(() => {