0
0
Fork 0
salix-front-mindshore-fork2/test/cypress/integration/invoiceIn/invoiceInDueDay.spec.js

29 lines
868 B
JavaScript
Raw Normal View History

2023-11-09 09:29:28 +00:00
/// <reference types="cypress" />
describe('InvoiceInDueDay', () => {
const amountInput = 'tbody > tr:nth-child(1) td:nth-child(4)';
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', () => {
cy.get(amountInput).type('{selectall}{backspace}23');
2023-11-09 09:29:28 +00:00
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();
2024-06-20 10:33:04 +00:00
cy.get('tbody > :nth-child(1)').should('exist');
2023-11-09 09:29:28 +00:00
cy.get('.q-notification__message').should('have.text', 'Data saved');
});
});