Lint fixes

This commit is contained in:
Conor_Mack 2020-06-24 16:20:58 +01:00
parent 306c733094
commit df5a9ee87a
2 changed files with 19 additions and 17 deletions

View File

@ -104,10 +104,10 @@ Cypress.Commands.add("addButtonComponent", () => {
cy.get("[data-cy=Button]").click() cy.get("[data-cy=Button]").click()
}) })
Cypress.Commands.add('navigateToFrontend', () => { Cypress.Commands.add("navigateToFrontend", () => {
cy.wait(4000) cy.wait(4000)
cy.get(".close").click() cy.get(".close").click()
cy.contains('frontend').click() cy.contains("frontend").click()
cy.wait(2000) cy.wait(2000)
cy.get(".close").click() cy.get(".close").click()
}) })
@ -115,13 +115,13 @@ Cypress.Commands.add('navigateToFrontend', () => {
Cypress.Commands.add("createScreen", (screenName, route) => { Cypress.Commands.add("createScreen", (screenName, route) => {
cy.get(".newscreen").click() cy.get(".newscreen").click()
cy.get(".uk-input:first").type(screenName) cy.get(".uk-input:first").type(screenName)
if(route) { if (route) {
cy.get(".uk-input:last").type(route) cy.get(".uk-input:last").type(route)
} }
cy.get('.uk-modal-footer').within(() => { cy.get(".uk-modal-footer").within(() => {
cy.contains('Create Screen').click() cy.contains("Create Screen").click()
}) })
cy.get('.nav-items-container').within(() => { cy.get(".nav-items-container").within(() => {
cy.contains(screenName).should('exist') cy.contains(screenName).should("exist")
}) })
}) })

View File

@ -29,7 +29,9 @@ export const searchAllComponents = (components, phrase) => {
} }
export const getExactComponent = (components, name, isScreen = false) => { 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 = []) => { export const getAncestorProps = (components, name, found = []) => {