/// describe('InvoiceOut summary', () => { const notification = '.q-notification__message'; const transferInvoice = { Client: { val: 'employee', type: 'select' }, Type: { val: 'Error in customer data', type: 'select' }, }; beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); cy.visit(`/#/invoice-out/list`); cy.get('#searchbar input').type('{enter}'); }); it('should generate the invoice PDF', () => { cy.get('#searchbar input').type('T1111111{enter}'); cy.get('[data-cy="descriptor-more-opts"] > .q-btn__content > .q-icon').click(); cy.get('.q-menu > .q-list > :nth-child(6)').click(); cy.dartaCy('VnConfirm_confirm').click(); cy.get(notification).should( 'contains.text', 'The invoice PDF document has been regenerated' ); }); it('should refund the invoice ', () => { cy.get('#searchbar input').type('T1111111{enter}'); cy.get('[data-cy="descriptor-more-opts"] > .q-btn__content > .q-icon').click(); cy.get('.q-menu > .q-list > :nth-child(7)').click(); cy.get('#q-portal--menu--3 > .q-menu > .q-list > :nth-child(2)').click(); cy.get(notification).should( 'contains.text', 'The following refund ticket have been created 1000000' ); }); it('should delete an invoice ', () => { cy.get('#searchbar input').type('T2222222{enter}'); cy.get('[data-cy="descriptor-more-opts"] > .q-btn__content > .q-icon').click(); cy.get('.q-menu > .q-list > :nth-child(4)').click(); cy.dartaCy('VnConfirm_confirm').click(); cy.get(notification).should('contains.text', 'InvoiceOut deleted'); }); it('should transfer the invoice ', () => { cy.get('#searchbar input').type('T1111111{enter}'); cy.get('[data-cy="descriptor-more-opts"] > .q-btn__content > .q-icon').click(); cy.get('.q-menu > .q-list > :nth-child(1)').click(); cy.fillInForm(transferInvoice); cy.get('.q-mt-lg > .q-btn').click(); cy.get(notification).should('contains.text', 'Transferred invoice'); }); });