salix-front/test/cypress/integration/invoiceIn/invoiceInDueDay.spec.js

31 lines
857 B
JavaScript
Raw Normal View History

2023-11-09 09:29:28 +00:00
/// <reference types="cypress" />
describe('InvoiceInDueDay', () => {
const inputs = 'label input';
const inputBtns = 'label button';
2023-11-09 14:17:09 +00:00
const addBtn = '.q-page-sticky > div > .q-btn > .q-btn__content';
2023-11-09 09:29:28 +00:00
beforeEach(() => {
cy.login('developer');
2023-11-09 14:17:09 +00:00
cy.visit(`/#/invoice-in/6/due-day`);
2023-11-09 09:29:28 +00:00
});
it('should update the amount', () => {
2023-11-09 14:17:09 +00:00
cy.get(inputBtns).eq(1).click();
2023-11-09 09:29:28 +00:00
cy.get(inputs).eq(3).type(23);
cy.saveCard();
cy.get('.q-notification__message').should('have.text', 'Data saved');
});
2023-11-09 14:17:09 +00:00
it('should remove the first line', () => {
cy.removeRow(1);
});
2023-11-09 09:29:28 +00:00
it('should add a new row ', () => {
2023-11-09 14:17:09 +00:00
cy.waitForElement('thead');
cy.get(addBtn).click();
2023-11-09 09:29:28 +00:00
cy.saveCard();
cy.get('.q-notification__message').should('have.text', 'Data saved');
});
});