forked from verdnatura/salix-front
ref #5835 fix due-day
This commit is contained in:
parent
46ee2a0075
commit
b6e8658de9
|
@ -65,16 +65,10 @@ const columns = computed(() => [
|
|||
]);
|
||||
|
||||
const isNotEuro = (code) => code != 'EUR';
|
||||
const areRows = ref(null);
|
||||
|
||||
async function insert() {
|
||||
if (!areRows.value) {
|
||||
await axios.post('/InvoiceInDueDays/new ', { id: Number(invoiceId) });
|
||||
await invoiceInFormRef.value.reload();
|
||||
}
|
||||
if (areRows.value) {
|
||||
invoiceInFormRef.value.insert();
|
||||
}
|
||||
await axios.post('/InvoiceInDueDays/new ', { id: Number(invoiceId) });
|
||||
await invoiceInFormRef.value.reload();
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
|
|
|
@ -2,28 +2,29 @@
|
|||
describe('InvoiceInDueDay', () => {
|
||||
const inputs = 'label input';
|
||||
const inputBtns = 'label button';
|
||||
const dialogBtns = '.q-dialog button';
|
||||
const addBtn = '.q-page-sticky > div > .q-btn > .q-btn__content';
|
||||
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/invoice-in/1/due-day`);
|
||||
cy.visit(`/#/invoice-in/6/due-day`);
|
||||
});
|
||||
|
||||
it('should update the amount', () => {
|
||||
cy.get(inputBtns).eq(0).click();
|
||||
cy.get(inputBtns).eq(1).click();
|
||||
cy.get(inputs).eq(3).type(23);
|
||||
cy.saveCard();
|
||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||
});
|
||||
|
||||
it('should add a new row ', () => {
|
||||
cy.addRow();
|
||||
cy.get(inputs).eq(11).type(8);
|
||||
cy.saveCard();
|
||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||
});
|
||||
|
||||
it('should remove the first line', () => {
|
||||
cy.removeRow(1);
|
||||
});
|
||||
|
||||
it('should add a new row ', () => {
|
||||
cy.waitForElement('thead');
|
||||
cy.get(addBtn).click();
|
||||
|
||||
cy.saveCard();
|
||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue