diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js index 60d8c5be1..9d3adbc73 100644 --- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js @@ -9,6 +9,7 @@ describe('InvoiceInList', () => { beforeEach(() => { cy.login('developer'); cy.visit(`/#/invoice-in`); + cy.clickFilterSearchBtn(); }); it('should redirect on clicking a invoice', () => { diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 7dc6ffab7..e4d1cebe1 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -178,9 +178,13 @@ Cypress.Commands.add('clearSearchbar', (element) => { }); Cypress.Commands.add('writeSearchbar', (value) => { - cy.get('#searchbar > form > label > div:nth-child(1) input').type(value); + cy.get('#searchbar > form > label > div:nth-child(1) input').type(value); }); Cypress.Commands.add('validateContent', (selector, expectedValue) => { cy.get(selector).should('have.text', expectedValue); }); + +Cypress.Commands.add('clickFilterSearchBtn', () => { + cy.get('.q-item__section > .q-btn > .q-btn__content > .q-icon').click(); +}); // registerCommands();