Fixes UAT for User

Needed to specify form name to prevent focus in asset tag search from being submitted
This commit is contained in:
snipe 2016-05-31 21:16:30 -07:00
parent 0e0b31bba6
commit 697ed0d53c
2 changed files with 6 additions and 6 deletions

View file

@ -37,7 +37,7 @@ input[type='text'][disabled], input[disabled], textarea[disabled], input[readonl
<div class="col-md-8 col-md-offset-2">
<form class="form-horizontal" method="post" action="" autocomplete="off">
<form class="form-horizontal" method="post" action="" autocomplete="off" id="userForm">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}">

View file

@ -21,13 +21,13 @@ $I->am('logged in admin');
$I->wantTo('ensure that you get errors when you submit an incomplete form');
$I->lookForwardTo('seeing errors display');
$I->click(['link' => 'Create New']);
$I->amOnPage('/admin/users/create');
$I->amOnPage('admin/users/create');
$I->dontSee('Create User', '.page-header');
$I->see('Create User', 'h1.pull-left');
/* Submit form and expect errors */
$I->click(['name' => 'email']);
$I->submitForm('.form-horizontal', [
$I->submitForm('#userForm', [
'email' => 'me@example.com',
]);
$I->seeElement('.alert-danger');
@ -37,11 +37,11 @@ $I->dontSeeInSource('&lt;br&gt;&lt;');
/* Submit form and expect errors */
$I->click(['name' => 'email']);
$I->click(['name' => 'username']);
$I->submitForm('.form-horizontal', [
'email' => 'me@example.com',
$I->submitForm('#userForm', [
'email' => \App\Helpers\Helper::generateRandomString(15).'@example.com',
'first_name' => 'Joe',
'last_name' => 'Smith',
'username' => 'joesmith',
'username' => \App\Helpers\Helper::generateRandomString(15),
]);
$I->seeElement('.alert-danger');