mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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">
|
<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 -->
|
<!-- CSRF Token -->
|
||||||
<input type="hidden" name="_token" value="{{ 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->wantTo('ensure that you get errors when you submit an incomplete form');
|
||||||
$I->lookForwardTo('seeing errors display');
|
$I->lookForwardTo('seeing errors display');
|
||||||
$I->click(['link' => 'Create New']);
|
$I->click(['link' => 'Create New']);
|
||||||
$I->amOnPage('/admin/users/create');
|
$I->amOnPage('admin/users/create');
|
||||||
$I->dontSee('Create User', '.page-header');
|
$I->dontSee('Create User', '.page-header');
|
||||||
$I->see('Create User', 'h1.pull-left');
|
$I->see('Create User', 'h1.pull-left');
|
||||||
|
|
||||||
/* Submit form and expect errors */
|
/* Submit form and expect errors */
|
||||||
$I->click(['name' => 'email']);
|
$I->click(['name' => 'email']);
|
||||||
$I->submitForm('.form-horizontal', [
|
$I->submitForm('#userForm', [
|
||||||
'email' => 'me@example.com',
|
'email' => 'me@example.com',
|
||||||
]);
|
]);
|
||||||
$I->seeElement('.alert-danger');
|
$I->seeElement('.alert-danger');
|
||||||
|
@ -37,11 +37,11 @@ $I->dontSeeInSource('<br><');
|
||||||
/* Submit form and expect errors */
|
/* Submit form and expect errors */
|
||||||
$I->click(['name' => 'email']);
|
$I->click(['name' => 'email']);
|
||||||
$I->click(['name' => 'username']);
|
$I->click(['name' => 'username']);
|
||||||
$I->submitForm('.form-horizontal', [
|
$I->submitForm('#userForm', [
|
||||||
'email' => 'me@example.com',
|
'email' => \App\Helpers\Helper::generateRandomString(15).'@example.com',
|
||||||
'first_name' => 'Joe',
|
'first_name' => 'Joe',
|
||||||
'last_name' => 'Smith',
|
'last_name' => 'Smith',
|
||||||
'username' => 'joesmith',
|
'username' => \App\Helpers\Helper::generateRandomString(15),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$I->seeElement('.alert-danger');
|
$I->seeElement('.alert-danger');
|
||||||
|
|
Loading…
Reference in a new issue