e2e first steps for balance compensations

This commit is contained in:
Carlos Jimenez Ruiz 2021-01-25 15:27:57 +01:00
parent de94d62f2e
commit 22af1ce989
2 changed files with 5 additions and 5 deletions

View File

@ -186,7 +186,7 @@ export default {
clientBalance: {
company: 'vn-client-balance-index vn-autocomplete[ng-model="$ctrl.companyId"]',
newPaymentButton: `vn-float-button`,
newPaymentBank: '.vn-dialog.shown vn-autocomplete[ng-model="$ctrl.receipt.bankFk"]',
newPaymentBank: '.vn-dialog.shown vn-autocomplete[ng-model="$ctrl.bankFk"]',
newPaymentAmount: '.vn-dialog.shown vn-input-number[ng-model="$ctrl.receipt.amountPaid"]',
newDescription: 'vn-textfield[ng-model="$ctrl.receipt.description"]',
saveButton: '.vn-dialog.shown [response="accept"]',

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors';
import getBrowser from '../../helpers/puppeteer';
describe('Client balance path', () => {
fdescribe('Client balance path', () => {
let browser;
let page;
beforeAll(async() => {
@ -38,7 +38,7 @@ describe('Client balance path', () => {
expect(message.text).toContain('Data saved!');
});
it('should click the new payment button', async() => {
it('should reload the section', async() => {
await page.closePopup();
await page.reloadSection('client.card.balance.index');
});
@ -46,9 +46,9 @@ describe('Client balance path', () => {
it('should create a new payment that clears the debt', async() => {
await page.closePopup();
await page.waitToClick(selectors.clientBalance.newPaymentButton);
await page.autocompleteSearch(selectors.clientBalance.newPaymentBank, 'Pay on receipt');
await page.autocompleteSearch(selectors.clientBalance.newPaymentBank, 'Cash');
await page.write(selectors.clientBalance.newDescription, 'Description');
await page.waitToClick(selectors.clientBalance.saveButton);
await page.waitToClick(selectors.clientBalance.saveButton); // app crashing
const message = await page.waitForSnackbar();
expect(message.text).toContain('Data saved!');