From c4dcac8c00906ad3f2a48078f69888546f426b3d Mon Sep 17 00:00:00 2001 From: jtubau Date: Tue, 28 Jan 2025 10:22:22 +0100 Subject: [PATCH 1/2] fix: refs #8420 ensure search bar is visible before typing and enable details test --- test/cypress/integration/invoiceIn/invoiceInList.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js index 0eb495419..4e2b8f9cc 100644 --- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js @@ -9,7 +9,7 @@ describe('InvoiceInList', () => { cy.viewport(1920, 1080); cy.login('developer'); cy.visit(`/#/invoice-in/list`); - cy.get('#searchbar input').type('{enter}'); + cy.get('#searchbar input').should('be.visible').type('{enter}'); }); it('should redirect on clicking a invoice', () => { @@ -22,7 +22,7 @@ describe('InvoiceInList', () => { }); }); // https://redmine.verdnatura.es/issues/8420 - it.skip('should open the details', () => { + it('should open the details', () => { cy.get(firstDetailBtn).click(); cy.get(summaryHeaders).eq(1).contains('Basic data'); cy.get(summaryHeaders).eq(4).contains('Vat'); From 63fc09ad1ccbc4da3dfb6a87b7a76145a01ab083 Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 29 Jan 2025 07:35:04 +0100 Subject: [PATCH 2/2] fix: update setupNodeEvents to use async/await for plugin import --- cypress.config.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cypress.config.js b/cypress.config.js index 500dda5c5..1924144f6 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -30,9 +30,11 @@ export default defineConfig({ testFiles: '**/*.spec.js', supportFile: 'test/cypress/support/unit.js', }, - setupNodeEvents(on, config) { - import('cypress-mochawesome-reporter/plugin').then((plugin) => plugin.default(on)); - // implement node event listeners here + setupNodeEvents: async (on, config) => { + const plugin = await import('cypress-mochawesome-reporter/plugin'); + plugin.default(on); + + return config; }, viewportWidth: 1280, viewportHeight: 720,