ref #5835 fix due-day
gitea/salix-front/pipeline/head There was a failure building this commit
Details
gitea/salix-front/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
46ee2a0075
commit
b6e8658de9
|
@ -65,16 +65,10 @@ const columns = computed(() => [
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const isNotEuro = (code) => code != 'EUR';
|
const isNotEuro = (code) => code != 'EUR';
|
||||||
const areRows = ref(null);
|
|
||||||
|
|
||||||
async function insert() {
|
async function insert() {
|
||||||
if (!areRows.value) {
|
await axios.post('/InvoiceInDueDays/new ', { id: Number(invoiceId) });
|
||||||
await axios.post('/InvoiceInDueDays/new ', { id: Number(invoiceId) });
|
await invoiceInFormRef.value.reload();
|
||||||
await invoiceInFormRef.value.reload();
|
|
||||||
}
|
|
||||||
if (areRows.value) {
|
|
||||||
invoiceInFormRef.value.insert();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -2,28 +2,29 @@
|
||||||
describe('InvoiceInDueDay', () => {
|
describe('InvoiceInDueDay', () => {
|
||||||
const inputs = 'label input';
|
const inputs = 'label input';
|
||||||
const inputBtns = 'label button';
|
const inputBtns = 'label button';
|
||||||
const dialogBtns = '.q-dialog button';
|
const addBtn = '.q-page-sticky > div > .q-btn > .q-btn__content';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-in/1/due-day`);
|
cy.visit(`/#/invoice-in/6/due-day`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should update the amount', () => {
|
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.get(inputs).eq(3).type(23);
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
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', () => {
|
it('should remove the first line', () => {
|
||||||
cy.removeRow(1);
|
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