From 0e9f50f6c3b4cff435ce8491d9ec311832ff4b18 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 18 Feb 2025 14:14:18 +0100 Subject: [PATCH] refactor: refs #8599 invoice out list e2e --- .../invoiceOut/invoiceOutList.spec.js | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/test/cypress/integration/invoiceOut/invoiceOutList.spec.js b/test/cypress/integration/invoiceOut/invoiceOutList.spec.js index df85e130eaf..24bc4ccf8ed 100644 --- a/test/cypress/integration/invoiceOut/invoiceOutList.spec.js +++ b/test/cypress/integration/invoiceOut/invoiceOutList.spec.js @@ -22,7 +22,7 @@ describe('InvoiceOut list', () => { cy.dataCy('InvoiceOutDownloadPdfBtn').click(); }); - it('should download all pdfs, then open the descriptor', () => { + it('should download all pdfs', () => { cy.get(columnCheckbox).click(); cy.dataCy('InvoiceOutDownloadPdfBtn').click(); }); @@ -32,12 +32,11 @@ describe('InvoiceOut list', () => { cy.get(summaryPopupIcon).click(); }); - it('should create a manual invoice and enter to its summary', () => { - cy.dataCy('vnTableCreateBtn').click(); - cy.dataCy('InvoiceOutCreateTicketinput').type(8); - cy.selectOption('[data-cy="InvoiceOutCreateSerialSelect"]', serial); - cy.dataCy('FormModelPopup_save').click(); - cy.checkNotification('Data created'); + it('should filter the results by client ID, then check the first result is correct', () => { + cy.dataCy('Customer ID_input').type('1103'); + cy.get(filterBtn).click(); + cy.get(firstRowDescriptor).click(); + cy.get('.q-item > .q-item__label').should('include.text', '1103'); }); it('should give an error when manual invoicing a ticket that is already invoiced', () => { @@ -48,10 +47,14 @@ describe('InvoiceOut list', () => { cy.checkNotification('This ticket is already invoiced'); }); - it('should filter the results by client ID, then check the first result is correct', () => { - cy.dataCy('Customer ID_input').type('1103'); - cy.get(filterBtn).click(); - cy.get(firstRowDescriptor).click(); - cy.get('.q-item > .q-item__label').should('include.text', '1103'); + it('should create a manual invoice and enter to its summary, then delete that invoice', () => { + cy.dataCy('vnTableCreateBtn').click(); + cy.dataCy('InvoiceOutCreateTicketinput').type(9); + cy.selectOption('[data-cy="InvoiceOutCreateSerialSelect"]', serial); + cy.dataCy('FormModelPopup_save').click(); + cy.checkNotification('Data created'); + cy.dataCy('descriptor-more-opts').click(); + cy.get('.q-menu > .q-list > :nth-child(4)').click(); + cy.dataCy('VnConfirm_confirm').click(); }); });