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
eb2d6a6e
Commit
eb2d6a6e
authored
Apr 03, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed rspec tests
parent
fc8ec950
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
app/views/u2f/_register.html.haml
app/views/u2f/_register.html.haml
+1
-1
spec/features/profiles/personal_access_tokens_spec.rb
spec/features/profiles/personal_access_tokens_spec.rb
+2
-2
spec/features/projects/files/project_owner_creates_license_file_spec.rb
...projects/files/project_owner_creates_license_file_spec.rb
+2
-2
spec/features/tags/master_views_tags_spec.rb
spec/features/tags/master_views_tags_spec.rb
+1
-1
spec/features/u2f_spec.rb
spec/features/u2f_spec.rb
+7
-7
No files found.
app/views/u2f/_register.html.haml
View file @
eb2d6a6e
...
...
@@ -36,7 +36,7 @@
=
text_field_tag
'u2f_registration[name]'
,
nil
,
class:
'form-control'
,
placeholder:
"Pick a name"
.col-md-3
=
hidden_field_tag
'u2f_registration[device_response]'
,
nil
,
class:
'form-control'
,
required:
true
,
id:
"js-device-response"
=
submit_tag
"Register U2F
D
evice"
,
class:
"btn btn-success"
=
submit_tag
"Register U2F
d
evice"
,
class:
"btn btn-success"
:javascript
var
u2fRegister
=
new
U2FRegister
(
$
(
"
#js-register-u2f
"
),
gon
.
u2f
);
...
...
spec/features/profiles/personal_access_tokens_spec.rb
View file @
eb2d6a6e
...
...
@@ -41,7 +41,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do
check
"api"
check
"read_user"
click_on
"Create
Personal Access T
oken"
click_on
"Create
personal access t
oken"
expect
(
active_personal_access_tokens
).
to
have_text
(
name
)
expect
(
active_personal_access_tokens
).
to
have_text
(
'In'
)
expect
(
active_personal_access_tokens
).
to
have_text
(
'api'
)
...
...
@@ -54,7 +54,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do
visit
profile_personal_access_tokens_path
fill_in
"Name"
,
with:
'My PAT'
expect
{
click_on
"Create
Personal Access T
oken"
}.
not_to
change
{
PersonalAccessToken
.
count
}
expect
{
click_on
"Create
personal access t
oken"
}.
not_to
change
{
PersonalAccessToken
.
count
}
expect
(
page
).
to
have_content
(
"Name cannot be nil"
)
end
end
...
...
spec/features/projects/files/project_owner_creates_license_file_spec.rb
View file @
eb2d6a6e
...
...
@@ -53,7 +53,7 @@ feature 'project owner creates a license file', feature: true, js: true do
expect
(
file_content
).
to
have_content
(
"Copyright (c)
#{
Time
.
now
.
year
}
#{
project
.
namespace
.
human_name
}
"
)
fill_in
:commit_message
,
with:
'Add a LICENSE file'
,
visible:
true
click_button
'Commit
C
hanges'
click_button
'Commit
c
hanges'
expect
(
current_path
).
to
eq
(
namespace_project_blob_path
(
project
.
namespace
,
project
,
'master/LICENSE'
))
...
...
@@ -63,7 +63,7 @@ feature 'project owner creates a license file', feature: true, js: true do
def
select_template
(
template
)
page
.
within
(
'.js-license-selector-wrap'
)
do
click_button
'Apply a
L
icense template'
click_button
'Apply a
k
icense template'
click_link
template
wait_for_ajax
end
...
...
spec/features/tags/master_views_tags_spec.rb
View file @
eb2d6a6e
...
...
@@ -16,7 +16,7 @@ feature 'Master views tags', feature: true do
fill_in
:commit_message
,
with:
'Add a README file'
,
visible:
true
# Remove pre-receive hook so we can push without auth
FileUtils
.
rm_f
(
File
.
join
(
project
.
repository
.
path
,
'hooks'
,
'pre-receive'
))
click_button
'Commit
C
hanges'
click_button
'Commit
c
hanges'
visit
namespace_project_tags_path
(
project
.
namespace
,
project
)
end
...
...
spec/features/u2f_spec.rb
View file @
eb2d6a6e
...
...
@@ -6,7 +6,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
before
{
allow_any_instance_of
(
U2fHelper
).
to
receive
(
:inject_u2f_api?
).
and_return
(
true
)
}
def
manage_two_factor_authentication
click_on
'Manage
Two-Factor A
uthentication'
click_on
'Manage
two-factor a
uthentication'
expect
(
page
).
to
have_content
(
"Setup New U2F Device"
)
wait_for_ajax
end
...
...
@@ -34,9 +34,9 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
it
'does not allow registering a new device'
do
visit
profile_account_path
click_on
'Enable
Two-Factor A
uthentication'
click_on
'Enable
two-factor a
uthentication'
expect
(
page
).
to
have_button
(
'Setup
New U2F D
evice'
,
disabled:
true
)
expect
(
page
).
to
have_button
(
'Setup
new U2F d
evice'
,
disabled:
true
)
end
end
...
...
@@ -111,9 +111,9 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
# Have the "u2f device" respond with bad data
page
.
execute_script
(
"u2f.register = function(_,_,_,callback) { callback('bad response'); };"
)
click_on
'Setup
New U2F D
evice'
click_on
'Setup
new U2F d
evice'
expect
(
page
).
to
have_content
(
'Your device was successfully set up'
)
click_on
'Register U2F
D
evice'
click_on
'Register U2F
d
evice'
expect
(
U2fRegistration
.
count
).
to
eq
(
0
)
expect
(
page
).
to
have_content
(
"The form contains the following error"
)
...
...
@@ -126,9 +126,9 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
# Failed registration
page
.
execute_script
(
"u2f.register = function(_,_,_,callback) { callback('bad response'); };"
)
click_on
'Setup
New U2F D
evice'
click_on
'Setup
new U2F d
evice'
expect
(
page
).
to
have_content
(
'Your device was successfully set up'
)
click_on
'Register U2F
D
evice'
click_on
'Register U2F
d
evice'
expect
(
page
).
to
have_content
(
"The form contains the following error"
)
# Successful registration
...
...
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