Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
83fb1190
Commit
83fb1190
authored
Sep 23, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get tests passing.
parent
00bfb645
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
spec/features/users_spec.rb
spec/features/users_spec.rb
+5
-4
spec/support/login_helpers.rb
spec/support/login_helpers.rb
+3
-1
No files found.
spec/features/users_spec.rb
View file @
83fb1190
...
...
@@ -61,16 +61,17 @@ feature 'Users', feature: true, js: true do
before
(
:each
)
do
visit
new_user_session_path
click_link
'Register'
@username_field
=
find
'.username'
@username_form_group
=
find
'.username'
@username_field
=
find
'#new_user_username'
end
scenario
'shows an error border if the username already exists'
do
scenario
'shows an error border if the username already exists'
,
focus:
true
do
fill_in
username_input
,
with:
user
.
username
wait_for_ajax
expect
(
@username_f
ield
).
to
have_css
'.gl-field-error-outline'
expect
(
@username_f
orm_group
).
to
have_css
'.gl-field-error-outline'
end
scenario
'doesn\'t show an error border if the username is available'
do
scenario
'doesn\'t show an error border if the username is available'
,
focus:
true
do
fill_in
username_input
,
with:
'new-user'
wait_for_ajax
expect
(
@username_field
).
not_to
have_css
'.gl-field-error-outline'
...
...
spec/support/login_helpers.rb
View file @
83fb1190
...
...
@@ -33,7 +33,9 @@ module LoginHelpers
fill_in
"user_login"
,
with:
user
.
email
fill_in
"user_password"
,
with:
"12345678"
check
'user_remember_me'
if
remember
click_button
"Sign in"
page
.
within
'.login-box'
do
click_button
"Sign in"
end
Thread
.
current
[
:current_user
]
=
user
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment