From 7be7b845cbe9c3ad03ba0a7e92f946f57ec844a7 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 6 Oct 2016 13:01:21 +0300 Subject: [PATCH] Fix for tests --- resources/views/invoices/edit.blade.php | 4 +++- tests/acceptance/CheckBalanceCest.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 716fc495f4..462d674b16 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -1317,7 +1317,9 @@ } @if ($invoice->trashed()) - return false; + if ($('#bulk_action').val() != 'restore') { + return false; + } @endif // check invoice number is unique diff --git a/tests/acceptance/CheckBalanceCest.php b/tests/acceptance/CheckBalanceCest.php index 8995454e2b..7271d12b77 100644 --- a/tests/acceptance/CheckBalanceCest.php +++ b/tests/acceptance/CheckBalanceCest.php @@ -77,6 +77,8 @@ class CheckBalanceCest // delete the invoice $I->amOnPage('/invoices/' . $invoiceId); + $I->executeJS('submitBulkAction("restore")'); + $I->wait(1); $I->executeJS('submitBulkAction("delete")'); $I->wait(1); $I->amOnPage("/clients/{$clientId}");