1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Working on tests

This commit is contained in:
Hillel Coren 2016-06-07 17:29:26 +03:00
parent 6b7542085a
commit cc55cdc1b5
2 changed files with 6 additions and 4 deletions

View File

@ -10,6 +10,7 @@ class InvoiceRequest extends EntityRequest {
{
$invoice = parent::entity();
/*
// support loading an invoice by its invoice number
if ($this->invoice_number && ! $invoice) {
$invoice = Invoice::scope()
@ -17,7 +18,8 @@ class InvoiceRequest extends EntityRequest {
->withTrashed()
->firstOrFail();
}
*/
// eager load the invoice items
if ($invoice && ! $invoice->relationLoaded('invoice_items')) {
$invoice->load('invoice_items');

View File

@ -68,7 +68,7 @@ class CheckBalanceCest
$I->see('Paid to Date $' . ($productPrice * 2));
// archive the invoice
$I->amOnPage('/invoices/' . $invoiceId . '/edit');
$I->amOnPage('/invoices/' . $invoiceId);
$I->executeJS('submitBulkAction("archive")');
$I->wait(1);
$I->amOnPage("/clients/{$clientId}");
@ -76,7 +76,7 @@ class CheckBalanceCest
$I->see('Paid to Date $' . ($productPrice * 2));
// delete the invoice
$I->amOnPage('/invoices/' . $invoiceId . '/edit');
$I->amOnPage('/invoices/' . $invoiceId);
$I->executeJS('submitBulkAction("delete")');
$I->wait(1);
$I->amOnPage("/clients/{$clientId}");
@ -84,7 +84,7 @@ class CheckBalanceCest
$I->see('Paid to Date $0.00');
// restore the invoice
$I->amOnPage('/invoices/' . $invoiceId . '/edit');
$I->amOnPage('/invoices/' . $invoiceId);
$I->executeJS('submitBulkAction("restore")');
$I->wait(1);
$I->amOnPage("/clients/{$clientId}");