From ff3e922e220201eb8eaa09d0b6701d45413ac700 Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Wed, 24 Jun 2020 16:58:30 +0100 Subject: [PATCH] Cypress Tests - Use Get Timeouts --- packages/builder/cypress/support/commands.js | 6 ++---- .../userInterface/pagesParsing/searchComponents.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 41b55597d1..33ae53d6da 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -105,11 +105,9 @@ Cypress.Commands.add("addButtonComponent", () => { }) Cypress.Commands.add("navigateToFrontend", () => { - cy.wait(4000) - cy.get(".close").click() + cy.get(".close", { timeout: 10000 }).click() cy.contains("frontend").click() - cy.wait(2000) - cy.get(".close").click() + cy.get(".close", { timeout: 10000 }).click() }) Cypress.Commands.add("createScreen", (screenName, route) => { diff --git a/packages/builder/src/components/userInterface/pagesParsing/searchComponents.js b/packages/builder/src/components/userInterface/pagesParsing/searchComponents.js index 25c2cfcc26..7ac0dd20ba 100644 --- a/packages/builder/src/components/userInterface/pagesParsing/searchComponents.js +++ b/packages/builder/src/components/userInterface/pagesParsing/searchComponents.js @@ -1,4 +1,4 @@ -import { find, isUndefined, filter, some, includes } from "lodash/fp" +import { isUndefined, filter, some, includes } from "lodash/fp" import { pipe } from "components/common/core" const normalString = s => (s || "").trim().toLowerCase()