From b6ff770c61f697849bffff48bd085942fe5ded20 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Tue, 19 Feb 2019 18:10:20 +0530 Subject: [PATCH] feat(cypress): Add awesomebar command --- cypress/support/commands.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index f25cc12ea6..36df14d1b0 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -49,4 +49,8 @@ Cypress.Commands.add('fill_field', (fieldname, value, fieldtype='Data') => { } else { return cy.get('@input').type(value); } -}); \ No newline at end of file +}); + +Cypress.Commands.add('awesomebar', (text) => { + cy.get('#navbar-search').type(`${text}{downarrow}{enter}`, { delay: 100 }); +});