From d467bec7bdf2ddb6f558c3790864f13de16659c5 Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Thu, 7 Jul 2022 11:07:05 +0100 Subject: [PATCH] Smoke Build Changes - Timing issues Timing issues persist for the smoke build. Increasing timeout values to try and combat this --- packages/builder/cypress.json | 2 +- .../adminAndManagement/userManagement.spec.js | 4 ++-- .../builder/cypress/integration/appOverview.spec.js | 4 ++-- .../integration/datasources/postgreSql.spec.js | 2 +- .../cypress/integration/renameAnApplication.spec.js | 13 +++++-------- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/packages/builder/cypress.json b/packages/builder/cypress.json index 844b77666d..f1eada481f 100644 --- a/packages/builder/cypress.json +++ b/packages/builder/cypress.json @@ -13,7 +13,7 @@ "HOST_IP": "" }, "retries": { - "runMode": 0, + "runMode": 1, "openMode": 0 } } \ No newline at end of file diff --git a/packages/builder/cypress/integration/adminAndManagement/userManagement.spec.js b/packages/builder/cypress/integration/adminAndManagement/userManagement.spec.js index a8ba27f7ab..e4be5e3be4 100644 --- a/packages/builder/cypress/integration/adminAndManagement/userManagement.spec.js +++ b/packages/builder/cypress/integration/adminAndManagement/userManagement.spec.js @@ -46,8 +46,8 @@ filterTests(["smoke", "all"], () => { cy.createApp(name) } else { cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000}) - cy.wait(500) - cy.get(interact.CREATE_APP_BUTTON, { timeout: 1000 }).click({ force: true }) + cy.wait(1000) + cy.get(interact.CREATE_APP_BUTTON, { timeout: 2000 }).click({ force: true }) cy.createAppFromScratch(name) } } diff --git a/packages/builder/cypress/integration/appOverview.spec.js b/packages/builder/cypress/integration/appOverview.spec.js index 9a08f72042..5856786bc4 100644 --- a/packages/builder/cypress/integration/appOverview.spec.js +++ b/packages/builder/cypress/integration/appOverview.spec.js @@ -333,8 +333,8 @@ filterTests(["all"], () => { cy.wait(1000) }) - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) - cy.get(".appTable .app-row-actions button", { timeout: 1000 }) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 }) + cy.get(".appTable .app-row-actions button", { timeout: 5000 }) .contains("Manage") .eq(0) .click({ force: true }) diff --git a/packages/builder/cypress/integration/datasources/postgreSql.spec.js b/packages/builder/cypress/integration/datasources/postgreSql.spec.js index de959e203c..598055225e 100644 --- a/packages/builder/cypress/integration/datasources/postgreSql.spec.js +++ b/packages/builder/cypress/integration/datasources/postgreSql.spec.js @@ -151,7 +151,7 @@ filterTests(["all"], () => { cy.get("@query").its("response.body").should("not.be.empty") // Save query cy.get(".spectrum-Button").contains("Save Query").click({ force: true }) - cy.get(".hierarchy-items-container").should("contain", queryName) + cy.get(".spectrum-Tabs-content", { timeout: 2000 }).should("contain", queryName) }) it("should switch to schema with no tables", () => { diff --git a/packages/builder/cypress/integration/renameAnApplication.spec.js b/packages/builder/cypress/integration/renameAnApplication.spec.js index 370efadff2..4460750b07 100644 --- a/packages/builder/cypress/integration/renameAnApplication.spec.js +++ b/packages/builder/cypress/integration/renameAnApplication.spec.js @@ -12,7 +12,7 @@ filterTests(["all"], () => { const appName = "Cypress Tests" const appRename = "Cypress Renamed" // Rename app, Search for app, Confirm name was changed - cy.visit(`${Cypress.config().baseUrl}/builder`) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) renameApp(appName, appRename) cy.reload() cy.searchForApplication(appRename) @@ -39,7 +39,7 @@ filterTests(["all"], () => { .click({ force: true }) }) // Rename app, Search for app, Confirm name was changed - cy.visit(`${Cypress.config().baseUrl}/builder`) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) renameApp(appName, appRename, true) cy.get(interact.APP_TABLE).find(interact.WRAPPER).should("have.length", 1) cy.applicationInAppTable(appRename) @@ -47,7 +47,7 @@ filterTests(["all"], () => { it("Should try to rename an application to have no name", () => { const appName = "Cypress Tests" - cy.visit(`${Cypress.config().baseUrl}/builder`) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) renameApp(appName, " ", false, true) // Close modal and confirm name has not been changed cy.get(interact.SPECTRUM_DIALOG_GRID, { timeout: 1000 }).contains("Cancel").click() @@ -57,7 +57,7 @@ filterTests(["all"], () => { xit("Should create two applications with the same name", () => { // It is not possible to have applications with the same name const appName = "Cypress Tests" - cy.visit(`${Cypress.config().baseUrl}/builder`) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) cy.get(interact.SPECTRUM_BUTTON), { timeout: 500 } .contains("Create app") .click({ force: true }) @@ -80,18 +80,15 @@ filterTests(["all"], () => { const appName = "Cypress Tests" const numberName = 12345 const specialCharName = "£$%^" - cy.visit(`${Cypress.config().baseUrl}/builder`) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) renameApp(appName, numberName) - cy.reload() cy.applicationInAppTable(numberName) - cy.reload() renameApp(numberName, specialCharName) cy.get(interact.ERROR).should( "have.text", "App name must be letters, numbers and spaces only" ) // Set app name back to Cypress Tests - cy.reload() renameApp(numberName, appName) })