diff --git a/src/test/cypress/integration/login/LoginViewCommands.js b/src/test/cypress/integration/login/LoginViewCommands.js index af464a13..90ffcb0f 100644 --- a/src/test/cypress/integration/login/LoginViewCommands.js +++ b/src/test/cypress/integration/login/LoginViewCommands.js @@ -51,10 +51,6 @@ Cypress.Commands.add('loginFlow', (user, visitLogin = true) => { cy.url().should('contain', '/#/cms/home'); }); -Cypress.Commands.add('waitForElement', (element, timeout = 5000) => { - cy.get(element, { timeout }).should('be.visible'); -}); - Cypress.Commands.add('changeLanguage', language => { const languagesOrder = ['en', 'es', 'ca', 'fr', 'pt']; const index = languagesOrder.indexOf(language); diff --git a/src/test/cypress/support/commands.js b/src/test/cypress/support/commands.js index ec169e53..768ae89b 100644 --- a/src/test/cypress/support/commands.js +++ b/src/test/cypress/support/commands.js @@ -45,3 +45,7 @@ Cypress.Commands.add('getValue', selector => { } }); }); + +Cypress.Commands.add('waitForElement', (element, timeout = 5000) => { + cy.get(element, { timeout }).should('be.visible'); +});