From c8843b095060d44e0fee76ee5c04b5ed6b255525 Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Thu, 7 Jul 2022 15:13:15 +0100 Subject: [PATCH] Cypress: Increasing timeout values Getting close.... but there are still some minor timing issues against the smoke build. I am increasing a few timeout values within postgreSQL & commands files --- .../cypress/integration/datasources/postgreSql.spec.js | 7 +++---- packages/builder/cypress/support/commands.js | 8 +++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/builder/cypress/integration/datasources/postgreSql.spec.js b/packages/builder/cypress/integration/datasources/postgreSql.spec.js index 598055225e..15e31308fc 100644 --- a/packages/builder/cypress/integration/datasources/postgreSql.spec.js +++ b/packages/builder/cypress/integration/datasources/postgreSql.spec.js @@ -231,10 +231,9 @@ filterTests(["all"], () => { // Run and Save query cy.get(".spectrum-Button").contains("Run Query").click({ force: true }) cy.wait(500) - cy.get(".spectrum-Button", { timeout: 500 }).contains("Save Query").click({ force: true }) - //cy.reload() - //cy.wait(500) - cy.get(".nav-item").should("contain", queryRename) + cy.get(".spectrum-Button", { timeout: 2000 }).contains("Save Query").click({ force: true }) + cy.reload({ timeout: 5000 }) + cy.get(".nav-item", { timeout: 2000 }).should("contain", queryRename) }) it("should delete a query", () => { diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 16bb11ea8e..6f05b2a9fd 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -134,16 +134,18 @@ Cypress.Commands.add("createApp", (name, addDefaultTable) => { const shouldCreateDefaultTable = typeof addDefaultTable != "boolean" ? true : addDefaultTable - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 }) cy.wait(1000) - cy.get(`[data-cy="create-app-btn"]`, { timeout: 2000 }).click({ force: true }) + cy.get(`[data-cy="create-app-btn"]`, { timeout: 5000 }).click({ force: true }) // If apps already exist cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`) .its("body") .then(val => { if (val.length > 0) { - cy.get(`[data-cy="create-app-btn"]`).click({ force: true }) + cy.get(`[data-cy="create-app-btn"]`, { timeout: 5000 }).click({ + force: true, + }) } })