2024-03-07 14:46:38 +00:00
|
|
|
describe('InvoiceInDescriptor', () => {
|
2024-05-24 07:56:16 +00:00
|
|
|
const dialogBtns = '.q-card__actions button';
|
2024-03-07 14:46:38 +00:00
|
|
|
const firstDescritorOpt = '.q-menu > .q-list > :nth-child(1) > .q-item__section';
|
2024-05-24 07:56:16 +00:00
|
|
|
const isBookedField =
|
|
|
|
'.q-card:nth-child(3) .vn-label-value:nth-child(5) > .value > span';
|
|
|
|
|
2024-03-07 14:46:38 +00:00
|
|
|
it('should booking and unbooking the invoice properly', () => {
|
|
|
|
cy.login('developer');
|
|
|
|
cy.visit(`/#/invoice-in/1/summary?limit=10`);
|
|
|
|
|
|
|
|
cy.openLeftMenu();
|
|
|
|
cy.openActionsDescriptor();
|
|
|
|
cy.get(firstDescritorOpt).click();
|
2024-05-24 07:56:16 +00:00
|
|
|
cy.get(dialogBtns).eq(1).click();
|
|
|
|
cy.get('.fullscreen').first().click();
|
|
|
|
cy.get(isBookedField).should('have.attr', 'title', 'true');
|
2024-03-07 14:46:38 +00:00
|
|
|
|
|
|
|
cy.openLeftMenu();
|
|
|
|
cy.openActionsDescriptor();
|
|
|
|
cy.get(firstDescritorOpt).click();
|
2024-05-24 07:56:16 +00:00
|
|
|
cy.get(dialogBtns).eq(1).click();
|
|
|
|
cy.get(isBookedField).should('have.attr', 'title', 'false');
|
2024-03-07 14:46:38 +00:00
|
|
|
});
|
|
|
|
});
|