This commit is contained in:
parent
484ba30137
commit
fa191af14c
|
@ -87,11 +87,11 @@ describe('Client balance path', () => {
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toContain('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should check balance is now 100', async() => {
|
it('should check balance is now -100', async() => {
|
||||||
let result = await nightmare
|
let result = await nightmare
|
||||||
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('100.00');
|
expect(result).toContain('-€100.00');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should again click the new payment button', async() => {
|
it('should again click the new payment button', async() => {
|
||||||
|
@ -107,18 +107,17 @@ describe('Client balance path', () => {
|
||||||
let result = await nightmare
|
let result = await nightmare
|
||||||
.clearInput(selectors.clientBalance.newPaymentAmountInput)
|
.clearInput(selectors.clientBalance.newPaymentAmountInput)
|
||||||
.write(selectors.clientBalance.newPaymentAmountInput, '-150')
|
.write(selectors.clientBalance.newPaymentAmountInput, '-150')
|
||||||
.wait(1999)
|
|
||||||
.waitToClick(selectors.clientBalance.saveButton)
|
.waitToClick(selectors.clientBalance.saveButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
expect(result).toContain('Data saved!');
|
expect(result).toContain('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should check balance is now -50', async() => {
|
it('should check balance is now 50', async() => {
|
||||||
let result = await nightmare
|
let result = await nightmare
|
||||||
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('€50.00');
|
expect(result).toContain('50');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now click on the Clients button of the top bar menu', async() => {
|
it('should now click on the Clients button of the top bar menu', async() => {
|
||||||
|
|
|
@ -46,7 +46,7 @@ export default class InputNumber extends Input {
|
||||||
set value(value) {
|
set value(value) {
|
||||||
this.hasValue = !(value === null || value === undefined || value === '');
|
this.hasValue = !(value === null || value === undefined || value === '');
|
||||||
|
|
||||||
if (!this.hasOwnProperty('_value') && this.hasValue)
|
if (!this.hasOwnProperty('_value') && this.hasValue || value === '')
|
||||||
this.input.value = value;
|
this.input.value = value;
|
||||||
|
|
||||||
this._value = value;
|
this._value = value;
|
||||||
|
|
|
@ -55,6 +55,7 @@ module.exports = Self => {
|
||||||
i.id,
|
i.id,
|
||||||
TRUE,
|
TRUE,
|
||||||
i.issued,
|
i.issued,
|
||||||
|
NULL,
|
||||||
c.code,
|
c.code,
|
||||||
i.created,
|
i.created,
|
||||||
i.ref,
|
i.ref,
|
||||||
|
@ -62,7 +63,6 @@ module.exports = Self => {
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
|
||||||
i.clientFk,
|
i.clientFk,
|
||||||
i.pdf,
|
i.pdf,
|
||||||
TRUE isInvoice
|
TRUE isInvoice
|
||||||
|
|
|
@ -32,6 +32,7 @@ class Controller {
|
||||||
setOrder(value) {
|
setOrder(value) {
|
||||||
this.params.params.companyFk = value;
|
this.params.params.companyFk = value;
|
||||||
this.filter.where.companyFk = value;
|
this.filter.where.companyFk = value;
|
||||||
|
this.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
|
|
Loading…
Reference in New Issue