From db6d658e98083bd601dedcd6429312582cadc2f2 Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Fri, 12 Aug 2022 17:31:35 +0100 Subject: [PATCH] Updating createApp test command In some cases Cypress is running too fast, meaning that the test runs ahead of what is actual seen on Budibase. This issue mainly occurs at the start of the smoke build and around logging in. I am attempting to combat this by ensuring the url includes 'apps' after logging in --- .../builder/cypress/integration/addMultiOptionDatatype.spec.js | 2 +- packages/builder/cypress/support/commands.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/cypress/integration/addMultiOptionDatatype.spec.js b/packages/builder/cypress/integration/addMultiOptionDatatype.spec.js index f844402958..f436f3ff39 100644 --- a/packages/builder/cypress/integration/addMultiOptionDatatype.spec.js +++ b/packages/builder/cypress/integration/addMultiOptionDatatype.spec.js @@ -2,7 +2,7 @@ import filterTests from "../support/filterTests" const interact = require('../support/interact') filterTests(['all'], () => { - xcontext("Add Multi-Option Datatype", () => { + context("Add Multi-Option Datatype", () => { before(() => { cy.login() cy.createTestApp() diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index d33bd516c1..acb56a0bce 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -164,7 +164,7 @@ Cypress.Commands.add("createApp", (name, addDefaultTable) => { typeof addDefaultTable != "boolean" ? true : addDefaultTable cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 }) - cy.wait(1000) + cy.url({ timeout: 30000 }).should("include", "/apps") cy.get(`[data-cy="create-app-btn"]`, { timeout: 5000 }).click({ force: true }) // If apps already exist