fix: refs #8600 fixed e2e
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jon Elias 2025-02-26 08:44:51 +01:00
parent 5c569f87c4
commit ed9736321e
2 changed files with 15 additions and 12 deletions

View File

@ -1,5 +1,6 @@
/// <reference types="cypress" />
describe('InvoiceOut manual invoice', () => {
const descriptorOptions = '[data-cy="descriptor-more-opts-menu"] > .q-list';
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
@ -7,15 +8,25 @@ describe('InvoiceOut manual invoice', () => {
cy.get('#searchbar input').type('{enter}');
});
it('should create an invoice from a ticket and go to that invoice', () => {
it('should create an invoice from a ticket and go to that invoice, then delete that invoice', () => {
cy.searchByLabel('Customer ID', '1101');
cy.get(
'[data-q-vs-anchor=""] > :nth-child(1) > .q-checkbox > .q-checkbox__inner'
'[data-q-vs-anchor=""] > :nth-child(1) > .q-checkbox > .q-checkbox__inner',
).click();
cy.dataCy('ticketListMakeInvoiceBtn').click();
cy.checkNotification('Data saved');
cy.get('.q-virtual-scroll__content > :nth-child(1) > :nth-child(3)').click();
cy.get(':nth-child(8) > .value > .link').click();
cy.get('.header > :nth-child(3) > .q-btn__content').click();
cy.get('[href="#/invoice-out/6/summary"] > .q-btn > .q-btn__content').click();
cy.dataCy('descriptor-more-opts').click();
cy.get(descriptorOptions)
.find('.q-item')
.its('length')
.then((count) => {
cy.log('Número de opciones:', count);
expect(count).to.equal(7);
});
cy.get('[data-cy="descriptor-more-opts-menu"] > .q-list > :nth-child(4)').click();
cy.get('[data-cy="VnConfirm_confirm"]').click();
});
});

View File

@ -32,7 +32,7 @@ describe('InvoiceOut summary', () => {
});
it('should open the ticket list', () => {
cy.get(toTicketList).click();
cy.dataCy('invoiceOutDescriptorTicketList').click();
cy.dataCy('vnFilterPanelChip').should('include.text', 'T1111111');
});
@ -61,14 +61,6 @@ describe('InvoiceOut summary', () => {
cy.checkNotification('Notification sent');
});
it('should delete an invoice ', () => {
cy.typeSearchbar('T2222222{enter}');
cy.dataCy('descriptor-more-opts').click();
cy.get(selectMenuOption(4)).click();
cy.dataCy('VnConfirm_confirm').click();
cy.checkNotification('InvoiceOut deleted');
});
it('should book the invoice', () => {
cy.dataCy('descriptor-more-opts').click();
cy.get(selectMenuOption(5)).click();