From 9c07d16be5fb5f52b550cc0aaffcf1c902648d8d Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 19 Jan 2018 12:20:03 +0200 Subject: [PATCH] Fix for tests --- resources/views/payments/edit.blade.php | 2 +- tests/acceptance/PaymentCest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/payments/edit.blade.php b/resources/views/payments/edit.blade.php index 7760d8ada689..22f6d84346a7 100644 --- a/resources/views/payments/edit.blade.php +++ b/resources/views/payments/edit.blade.php @@ -223,7 +223,7 @@ var invoice = invoiceMap[invoiceId]; 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); return true; } else { diff --git a/tests/acceptance/PaymentCest.php b/tests/acceptance/PaymentCest.php index 3eeb70bc04fc..b425af18b6a9 100644 --- a/tests/acceptance/PaymentCest.php +++ b/tests/acceptance/PaymentCest.php @@ -55,7 +55,7 @@ class PaymentCest $I->fillField(['name' => 'transaction_reference'], $this->faker->text(12)); $I->click('Save'); - $I->wait(1); + $I->wait(2); $I->see('Successfully created payment'); $I->seeInDatabase('payments', ['amount' => number_format($amount, 2)]);