From df5a9ee87aad1faa96e5c6e1671ea2a970234e70 Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Wed, 24 Jun 2020 16:20:58 +0100 Subject: [PATCH] Lint fixes --- packages/builder/cypress/support/commands.js | 32 +++++++++---------- .../pagesParsing/searchComponents.js | 4 ++- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index f777adc333..41b55597d1 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -104,24 +104,24 @@ Cypress.Commands.add("addButtonComponent", () => { cy.get("[data-cy=Button]").click() }) -Cypress.Commands.add('navigateToFrontend', () => { - cy.wait(4000) +Cypress.Commands.add("navigateToFrontend", () => { + cy.wait(4000) cy.get(".close").click() - cy.contains('frontend').click() - cy.wait(2000) + cy.contains("frontend").click() + cy.wait(2000) cy.get(".close").click() }) Cypress.Commands.add("createScreen", (screenName, route) => { - cy.get(".newscreen").click() - cy.get(".uk-input:first").type(screenName) - if(route) { - cy.get(".uk-input:last").type(route) - } - cy.get('.uk-modal-footer').within(() => { - cy.contains('Create Screen').click() - }) - cy.get('.nav-items-container').within(() => { - cy.contains(screenName).should('exist') - }) -}) \ No newline at end of file + cy.get(".newscreen").click() + cy.get(".uk-input:first").type(screenName) + if (route) { + cy.get(".uk-input:last").type(route) + } + cy.get(".uk-modal-footer").within(() => { + cy.contains("Create Screen").click() + }) + cy.get(".nav-items-container").within(() => { + cy.contains(screenName).should("exist") + }) +}) diff --git a/packages/builder/src/components/userInterface/pagesParsing/searchComponents.js b/packages/builder/src/components/userInterface/pagesParsing/searchComponents.js index 58ab70a5df..25c2cfcc26 100644 --- a/packages/builder/src/components/userInterface/pagesParsing/searchComponents.js +++ b/packages/builder/src/components/userInterface/pagesParsing/searchComponents.js @@ -29,7 +29,9 @@ export const searchAllComponents = (components, phrase) => { } export const getExactComponent = (components, name, isScreen = false) => { - return components.find(c => isScreen ? c.props._instanceName === name : c._instanceName === name) + return components.find(c => + isScreen ? c.props._instanceName === name : c._instanceName === name + ) } export const getAncestorProps = (components, name, found = []) => {