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

View File

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