From d1f34c445370d0713efec6df5122c403c8e7803c Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Wed, 6 Jul 2022 15:56:02 +0100 Subject: [PATCH 1/2] Smoke Build Test Changes Changes have been made to the following test files to remove smoke build failures: - addRadioButtons.spec.js - accountPortals.spec.js - userManagement.spec.js - userSettings.spec.js --- packages/builder/cypress/integration/addRadioButtons.spec.js | 4 ++++ .../integration/adminAndManagement/accountPortals.spec.js | 5 +++-- .../integration/adminAndManagement/userManagement.spec.js | 2 +- .../integration/adminAndManagement/userSettings.spec.js | 2 ++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/builder/cypress/integration/addRadioButtons.spec.js b/packages/builder/cypress/integration/addRadioButtons.spec.js index 8f5b1a527b..402db195aa 100644 --- a/packages/builder/cypress/integration/addRadioButtons.spec.js +++ b/packages/builder/cypress/integration/addRadioButtons.spec.js @@ -36,5 +36,9 @@ filterTests(['all'], () => { }) cy.addCustomSourceOptions(totalRadioButtons) } + + after(() => { + cy.deleteAllApps() + }) }) }) diff --git a/packages/builder/cypress/integration/adminAndManagement/accountPortals.spec.js b/packages/builder/cypress/integration/adminAndManagement/accountPortals.spec.js index c615b2b4e6..491a4abc44 100644 --- a/packages/builder/cypress/integration/adminAndManagement/accountPortals.spec.js +++ b/packages/builder/cypress/integration/adminAndManagement/accountPortals.spec.js @@ -9,10 +9,11 @@ filterTests(["smoke", "all"], () => { before(() => { cy.login() cy.deleteApp("Cypress Tests") - cy.createApp("Cypress Tests") + cy.createApp("Cypress Tests", false) // Create new user - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 1000}) + cy.wait(500) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000}) cy.createUser(bbUserEmail) cy.contains("bbuser").click() cy.wait(500) diff --git a/packages/builder/cypress/integration/adminAndManagement/userManagement.spec.js b/packages/builder/cypress/integration/adminAndManagement/userManagement.spec.js index 3c23086136..8e42f8cb88 100644 --- a/packages/builder/cypress/integration/adminAndManagement/userManagement.spec.js +++ b/packages/builder/cypress/integration/adminAndManagement/userManagement.spec.js @@ -10,7 +10,7 @@ filterTests(["smoke", "all"], () => { }) it("should create a user via basic onboarding", () => { - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 1000}) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000}) cy.createUser("bbuser@test.com") cy.get(interact.SPECTRUM_TABLE).should("contain", "bbuser") }) diff --git a/packages/builder/cypress/integration/adminAndManagement/userSettings.spec.js b/packages/builder/cypress/integration/adminAndManagement/userSettings.spec.js index 7827275620..95af9f7841 100644 --- a/packages/builder/cypress/integration/adminAndManagement/userSettings.spec.js +++ b/packages/builder/cypress/integration/adminAndManagement/userSettings.spec.js @@ -103,6 +103,8 @@ filterTests(["smoke", "all"], () => { } cy.get("button").contains("Update password").click({ force: true }) }) + // Remove users name + cy.updateUserInformation() }) }) }) From c8695c3526bad770c1567b643001d1651487655e Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Wed, 6 Jul 2022 16:17:58 +0100 Subject: [PATCH 2/2] CreateApp test file update A few timing issues that need sorted. There may be more after this as they tend to be linear through the test run --- packages/builder/cypress/integration/createApp.spec.js | 5 +++-- packages/builder/cypress/support/commands.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/builder/cypress/integration/createApp.spec.js b/packages/builder/cypress/integration/createApp.spec.js index 00c875e4fa..ca52c66e35 100644 --- a/packages/builder/cypress/integration/createApp.spec.js +++ b/packages/builder/cypress/integration/createApp.spec.js @@ -51,7 +51,8 @@ filterTests(['smoke', 'all'], () => { cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 }) // Start create app process. If apps already exist, click second button - cy.get(interact.CREATE_APP_BUTTON, { timeout: 1000 }).click({ force: true }) + cy.wait(1000) + cy.get(interact.CREATE_APP_BUTTON, { timeout: 3000 }).click({ force: true }) const appName = "Cypress Tests" cy.get(interact.SPECTRUM_MODAL).within(() => { @@ -86,7 +87,7 @@ filterTests(['smoke', 'all'], () => { const appName = "Cypress Tests" cy.createApp(appName, false) - cy.visit(`${Cypress.config().baseUrl}/builder`) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) cy.applicationInAppTable(appName) cy.deleteApp(appName) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 9d77b89c57..16bb11ea8e 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -135,6 +135,7 @@ Cypress.Commands.add("createApp", (name, addDefaultTable) => { typeof addDefaultTable != "boolean" ? true : addDefaultTable cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) + cy.wait(1000) cy.get(`[data-cy="create-app-btn"]`, { timeout: 2000 }).click({ force: true }) // If apps already exist