Fix for tests

This commit is contained in:
Hillel Coren 2018-01-19 12:20:03 +02:00
parent 39c94fb522
commit 9c07d16be5
2 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@
var invoice = invoiceMap[invoiceId]; var invoice = invoiceMap[invoiceId];
var amount = $('#amount').val(); var amount = $('#amount').val();
if (amount <= invoice.balance || confirm("{{ trans('texts.amount_greater_than_balance') }}")) { if (NINJA.praseFloat(amount) <= invoice.balance || confirm("{{ trans('texts.amount_greater_than_balance') }}")) {
$('#saveButton').attr('disabled', true); $('#saveButton').attr('disabled', true);
return true; return true;
} else { } else {

View File

@ -55,7 +55,7 @@ class PaymentCest
$I->fillField(['name' => 'transaction_reference'], $this->faker->text(12)); $I->fillField(['name' => 'transaction_reference'], $this->faker->text(12));
$I->click('Save'); $I->click('Save');
$I->wait(1); $I->wait(2);
$I->see('Successfully created payment'); $I->see('Successfully created payment');
$I->seeInDatabase('payments', ['amount' => number_format($amount, 2)]); $I->seeInDatabase('payments', ['amount' => number_format($amount, 2)]);