/// <reference types="cypress" />
describe('InvoiceOut manual invoice', () => {
    beforeEach(() => {
        cy.viewport(1920, 1080);
        cy.login('developer');
        cy.visit(`/#/ticket/list`);
        cy.get('#searchbar input').type('{enter}');
    });

    it('should create an invoice from a ticket and go to that invoice', () => {
        cy.searchByLabel('Customer ID', '1101');
        cy.get(
            '[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();
    });
});
