From 8c2cc42de2afa9c02481204c9eaf92b4f51ca554 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 25 Feb 2025 10:11:33 +0100 Subject: [PATCH] test: refs #8581 refactor InvoiceInDescriptor tests for better structure and readability --- .../invoiceIn/invoiceInDescriptor.spec.js | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js index 97a9fe976..6c247b5b8 100644 --- a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js @@ -3,19 +3,21 @@ describe('InvoiceInDescriptor', () => { const firstDescritorOpt = '.q-menu > .q-list > :nth-child(5) > .q-item__section'; const checkbox = ':nth-child(5) > .q-checkbox'; - it('should booking and unbooking the invoice properly', () => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('/#/invoice-in/1/summary'); - cy.waitForElement('.q-page'); + describe('more options', () => { + it('should booking and unbooking the invoice properly', () => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('/#/invoice-in/1/summary'); + cy.waitForElement('.q-page'); - cy.get(book).click(); - cy.dataCy('VnConfirm_confirm').click(); - cy.get(checkbox).invoke('attr', 'aria-checked').should('eq', 'true'); + cy.get(book).click(); + cy.dataCy('VnConfirm_confirm').click(); + cy.get(checkbox).invoke('attr', 'aria-checked').should('eq', 'true'); - cy.dataCy('descriptor-more-opts').first().click(); - cy.get(firstDescritorOpt).click(); - cy.dataCy('VnConfirm_confirm').click(); - cy.get(checkbox).invoke('attr', 'aria-checked').should('eq', 'false'); + cy.dataCy('descriptor-more-opts').first().click(); + cy.get(firstDescritorOpt).click(); + cy.dataCy('VnConfirm_confirm').click(); + cy.get(checkbox).invoke('attr', 'aria-checked').should('eq', 'false'); + }); }); });