mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Fixes UAT for User
Needed to specify form name to prevent focus in asset tag search from being submitted
This commit is contained in:
parent
0e0b31bba6
commit
697ed0d53c
|
@ -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() }}">
|
||||
|
||||
|
|
|
@ -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('<br><');
|
|||
/* 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');
|
||||
|
|
Loading…
Reference in a new issue