From 71b5b8d47ade19849ec608e3efdb7758671b9591 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 30 Jan 2025 08:10:26 +0100 Subject: [PATCH] fix: fixed InvoiceOutList e2e --- src/pages/InvoiceOut/InvoiceOutList.vue | 2 +- src/pages/InvoiceOut/locale/en.yml | 3 ++- src/pages/InvoiceOut/locale/es.yml | 7 ++++--- .../integration/invoiceOut/invoiceOutList.spec.js | 15 +++++---------- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index b121bc6ea..9398ded64 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -368,7 +368,7 @@ watchEffect(selectedRows); describe('InvoiceOut list', () => { - const invoice = { - Ticket: { val: '8' }, - Serial: { val: 'Española rapida', type: 'select' }, - }; - const invoiceError = { - Ticket: { val: '1' }, - Serial: { val: 'Española rapida', type: 'select' }, - }; + const serial = 'Española rapida'; beforeEach(() => { cy.viewport(1920, 1080); @@ -32,14 +25,16 @@ describe('InvoiceOut list', () => { it('should give an error when manual invoicing a ticket that is already invoiced', () => { cy.dataCy('vnTableCreateBtn').click(); - cy.fillInForm(invoiceError); + cy.dataCy('InvoiceOutCreateTicketinput').type(1); + cy.selectOption('[data-cy="InvoiceOutCreateSerialSelect"]', serial); cy.dataCy('FormModelPopup_save').click(); cy.checkNotification('This ticket is already invoiced'); }); it('should create a manual invoice and enter to its summary', () => { cy.dataCy('vnTableCreateBtn').click(); - cy.fillInForm(invoice); + cy.dataCy('InvoiceOutCreateTicketinput').type(8); + cy.selectOption('[data-cy="InvoiceOutCreateSerialSelect"]', serial); cy.dataCy('FormModelPopup_save').click(); cy.checkNotification('Data created'); });