Started to fix some of the URLs and routes in test (#3066)

This commit is contained in:
snipe 2016-12-15 04:28:16 -08:00
parent b17e380aae
commit 8faffb1889
3 changed files with 8 additions and 8 deletions

View file

@ -76,7 +76,7 @@ class AccessoriesCest
public function allowsDelete(FunctionalTester $I) public function allowsDelete(FunctionalTester $I)
{ {
$I->wantTo('Ensure I can delete an accessory'); $I->wantTo('Ensure I can delete an accessory');
$I->amOnPage( route('delete/accessory', $I->getAccessoryId() ) ); $I->amOnPage( route('accessories.destroy', $I->getAccessoryId() ) );
$I->seeElement('.alert-success'); $I->seeElement('.alert-success');
} }
} }

View file

@ -23,7 +23,7 @@ class AssetsCest
public function failsEmptyValidation(FunctionalTester $I) public function failsEmptyValidation(FunctionalTester $I)
{ {
$I->wantTo("Test Validation Fails with blank elements"); $I->wantTo("Test Validation Fails with blank elements");
$I->amOnPage(route('create/hardware')); $I->amOnPage(route('hardware.create'));
$I->click('Save'); $I->click('Save');
$I->seeElement('.alert-danger'); $I->seeElement('.alert-danger');
$I->see('The asset tag field is required.', '.alert-msg'); $I->see('The asset tag field is required.', '.alert-msg');
@ -52,7 +52,7 @@ class AssetsCest
'requestable' => $asset->requestable, 'requestable' => $asset->requestable,
]; ];
$I->wantTo("Test Validation Succeeds"); $I->wantTo("Test Validation Succeeds");
$I->amOnPage(route('create/hardware')); $I->amOnPage(route('hardware.create'));
$I->submitForm('form#create-form', $values); $I->submitForm('form#create-form', $values);
$I->seeRecord('assets', $values); $I->seeRecord('assets', $values);
$I->dontSeeElement('.alert-danger'); // We should check for success, but we can't because of the stupid ajaxy way I did things. FIXME when the asset form is rewritten. $I->dontSeeElement('.alert-danger'); // We should check for success, but we can't because of the stupid ajaxy way I did things. FIXME when the asset form is rewritten.

View file

@ -16,7 +16,7 @@ class ConsumablesCest
{ {
$I->wantTo('ensure that the create consumables form loads without errors'); $I->wantTo('ensure that the create consumables form loads without errors');
$I->lookForwardTo('seeing it load without errors'); $I->lookForwardTo('seeing it load without errors');
$I->amOnPage(route('create/consumable')); $I->amOnPage(route('consumables.create'));
$I->dontSee('Create Consumable', '.page-header'); $I->dontSee('Create Consumable', '.page-header');
$I->see('Create Consumable', 'h1.pull-left'); $I->see('Create Consumable', 'h1.pull-left');
} }
@ -24,7 +24,7 @@ class ConsumablesCest
public function failsEmptyValidation(FunctionalTester $I) public function failsEmptyValidation(FunctionalTester $I)
{ {
$I->wantTo("Test Validation Fails with blank elements"); $I->wantTo("Test Validation Fails with blank elements");
$I->amOnPage(route('create/consumable')); $I->amOnPage(route('consumables.create'));
$I->click('Save'); $I->click('Save');
$I->seeElement('.alert-danger'); $I->seeElement('.alert-danger');
$I->see('The name field is required.', '.alert-msg'); $I->see('The name field is required.', '.alert-msg');
@ -35,7 +35,7 @@ class ConsumablesCest
public function failsShortValidation(FunctionalTester $I) public function failsShortValidation(FunctionalTester $I)
{ {
$I->wantTo("Test Validation Fails with short name"); $I->wantTo("Test Validation Fails with short name");
$I->amOnPage(route('create/consumable')); $I->amOnPage(route('consumables.create'));
$I->fillField('name', 't2'); $I->fillField('name', 't2');
$I->fillField('qty', '-15'); $I->fillField('qty', '-15');
$I->fillField('min_amt', '-15'); $I->fillField('min_amt', '-15');
@ -62,7 +62,7 @@ class ConsumablesCest
'min_amt' => $consumable->min_amt, 'min_amt' => $consumable->min_amt,
]; ];
$I->wantTo("Test Validation Succeeds"); $I->wantTo("Test Validation Succeeds");
$I->amOnPage(route('create/consumable')); $I->amOnPage(route('consumables.index'));
$I->submitForm('form#create-form', $values); $I->submitForm('form#create-form', $values);
$I->seeRecord('consumables', $values); $I->seeRecord('consumables', $values);
$I->seeElement('.alert-success'); $I->seeElement('.alert-success');
@ -71,7 +71,7 @@ class ConsumablesCest
public function allowsDelete(FunctionalTester $I) public function allowsDelete(FunctionalTester $I)
{ {
$I->wantTo('Ensure I can delete a consumable'); $I->wantTo('Ensure I can delete a consumable');
$I->amOnPage(route('delete/consumable', $I->getConsumableId())); $I->amOnPage(route('consumables.destroy', $I->getConsumableId()));
$I->seeElement('.alert-success'); $I->seeElement('.alert-success');
} }
} }