e2e updated
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
7a1d697375
commit
a156a26e19
|
@ -189,8 +189,9 @@ export default {
|
||||||
newPaymentBank: '.vn-dialog.shown vn-autocomplete[ng-model="$ctrl.receipt.bankFk"]',
|
newPaymentBank: '.vn-dialog.shown vn-autocomplete[ng-model="$ctrl.receipt.bankFk"]',
|
||||||
newPaymentAmount: '.vn-dialog.shown vn-input-number[ng-model="$ctrl.receipt.amountPaid"]',
|
newPaymentAmount: '.vn-dialog.shown vn-input-number[ng-model="$ctrl.receipt.amountPaid"]',
|
||||||
saveButton: '.vn-dialog.shown [response="accept"]',
|
saveButton: '.vn-dialog.shown [response="accept"]',
|
||||||
firstBalanceLine: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)'
|
firstLineBalance: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)',
|
||||||
|
firstLineReference: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td-editable',
|
||||||
|
firstLineReferenceInput: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td-editable > div > field > vn-textfield'
|
||||||
},
|
},
|
||||||
webPayment: {
|
webPayment: {
|
||||||
confirmFirstPaymentButton: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon-button[icon="done_all"]',
|
confirmFirstPaymentButton: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon-button[icon="done_all"]',
|
||||||
|
|
|
@ -53,15 +53,28 @@ describe('Client balance path', () => {
|
||||||
expect(message.type).toBe('success');
|
expect(message.type).toBe('success');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should check balance is now 0 and the company is now VNL becouse the user local settings were removed', async() => {
|
it('should edit the 1st line reference', async() => {
|
||||||
|
await page.waitToClick(selectors.clientBalance.firstLineReference);
|
||||||
|
await page.write(selectors.clientBalance.firstLineReferenceInput, 'Miscellaneous payment');
|
||||||
|
await page.keyboard.press('Enter');
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.type).toBe('success');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check balance is now 0, the reference was saved and the company is now VNL becouse the user local settings were removed', async() => {
|
||||||
await page.waitForSpinnerLoad();
|
await page.waitForSpinnerLoad();
|
||||||
let company = await page
|
let company = await page
|
||||||
.waitToGetProperty(selectors.clientBalance.company, 'value');
|
.waitToGetProperty(selectors.clientBalance.company, 'value');
|
||||||
|
|
||||||
|
let reference = await page
|
||||||
|
.waitToGetProperty(selectors.clientBalance.firstLineReference, 'innerText');
|
||||||
|
|
||||||
let firstBalanceLine = await page
|
let firstBalanceLine = await page
|
||||||
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
.waitToGetProperty(selectors.clientBalance.firstLineBalance, 'innerText');
|
||||||
|
|
||||||
expect(company).toEqual('VNL');
|
expect(company).toEqual('VNL');
|
||||||
|
expect(reference).toEqual('Miscellaneous payment');
|
||||||
expect(firstBalanceLine).toContain('0.00');
|
expect(firstBalanceLine).toContain('0.00');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -76,7 +89,7 @@ describe('Client balance path', () => {
|
||||||
|
|
||||||
it('should check balance is now -100', async() => {
|
it('should check balance is now -100', async() => {
|
||||||
let result = await page
|
let result = await page
|
||||||
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
.waitToGetProperty(selectors.clientBalance.firstLineBalance, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('-€100.00');
|
expect(result).toContain('-€100.00');
|
||||||
});
|
});
|
||||||
|
@ -92,7 +105,7 @@ describe('Client balance path', () => {
|
||||||
|
|
||||||
it('should check balance is now 50', async() => {
|
it('should check balance is now 50', async() => {
|
||||||
let result = await page
|
let result = await page
|
||||||
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
|
.waitToGetProperty(selectors.clientBalance.firstLineBalance, 'innerText');
|
||||||
|
|
||||||
expect(result).toEqual('€50.00');
|
expect(result).toEqual('€50.00');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue