Refactor #1581 client.balance.create
gitea/salix/dev This commit looks good Details

This commit is contained in:
Bernat 2019-07-04 10:34:19 +02:00
parent 12f20b2d58
commit 061f0cb39c
3 changed files with 7 additions and 7 deletions

View File

@ -164,7 +164,7 @@ export default {
balanceButton: 'vn-left-menu a[ui-sref="client.card.balance.index"]', balanceButton: 'vn-left-menu a[ui-sref="client.card.balance.index"]',
companyAutocomplete: 'vn-client-balance-index vn-autocomplete[field="$ctrl.companyFk"]', companyAutocomplete: 'vn-client-balance-index vn-autocomplete[field="$ctrl.companyFk"]',
newPaymentButton: `${components.vnFloatButton}`, newPaymentButton: `${components.vnFloatButton}`,
newPaymentBankInut: 'vn-client-balance-create vn-textfield[field="$ctrl.receipt.bankFk"] input', newPaymentBank: 'vn-client-balance-create vn-autocomplete[field="$ctrl.receipt.bankFk"]',
newPaymentAmountInput: 'vn-client-balance-create vn-input-number[field="$ctrl.receipt.amountPaid"] input', newPaymentAmountInput: 'vn-client-balance-create vn-input-number[field="$ctrl.receipt.amountPaid"] input',
saveButton: 'vn-client-balance-create vn-button[label="Save"]', saveButton: 'vn-client-balance-create vn-button[label="Save"]',
firstBalanceLine: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)' firstBalanceLine: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)'

View File

@ -48,8 +48,7 @@ describe('Client balance path', () => {
it('should create a new payment that clears the debt', async() => { it('should create a new payment that clears the debt', async() => {
let result = await nightmare let result = await nightmare
.clearInput(selectors.clientBalance.newPaymentBankInut) .autocompleteSearch(selectors.clientBalance.newPaymentBank, 'Pay on receipt')
.write(selectors.clientBalance.newPaymentBankInut, '2')
.waitToClick(selectors.clientBalance.saveButton) .waitToClick(selectors.clientBalance.saveButton)
.waitForLastSnackbar(); .waitForLastSnackbar();

View File

@ -22,12 +22,13 @@
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield <vn-autocomplete vn-one
vn-one url="/api/Banks"
margin-medium-right
label="Bank" label="Bank"
show-field="bank"
value-field="id"
field="$ctrl.receipt.bankFk"> field="$ctrl.receipt.bankFk">
</vn-textfield> </vn-autocomplete>
<vn-input-number vn-one vn-focus <vn-input-number vn-one vn-focus
label="Amount" label="Amount"
field="$ctrl.receipt.amountPaid" step="0.01"> field="$ctrl.receipt.amountPaid" step="0.01">