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
5f36bb92
Commit
5f36bb92
authored
Apr 12, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a few specs after updating capybara and selenium-webdriver
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
f766f7af
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
27 deletions
+10
-27
spec/features/admin/admin_hooks_spec.rb
spec/features/admin/admin_hooks_spec.rb
+7
-3
spec/features/projects/members/user_requests_access_spec.rb
spec/features/projects/members/user_requests_access_spec.rb
+2
-1
spec/features/u2f_spec.rb
spec/features/u2f_spec.rb
+0
-20
spec/support/shared_examples/features/master_manages_access_requests_shared_example.rb
...features/master_manages_access_requests_shared_example.rb
+1
-3
No files found.
spec/features/admin/admin_hooks_spec.rb
View file @
5f36bb92
...
@@ -73,22 +73,26 @@ describe 'Admin::Hooks' do
...
@@ -73,22 +73,26 @@ describe 'Admin::Hooks' do
end
end
describe
'Remove existing hook'
,
:js
do
describe
'Remove existing hook'
,
:js
do
let
(
:hook_url
)
{
generate
(
:url
)
}
before
do
before
do
create
(
:system_hook
)
create
(
:system_hook
,
url:
hook_url
)
end
end
context
'removes existing hook'
do
context
'removes existing hook'
do
it
'from hooks list page'
do
it
'from hooks list page'
do
visit
admin_hooks_path
visit
admin_hooks_path
expect
{
accept_confirm
{
find
(
:link
,
'Remove'
).
send_keys
(
:return
)
}
}.
to
change
(
SystemHook
,
:count
).
by
(
-
1
)
accept_confirm
{
click_link
'Remove'
}
expect
(
page
).
not_to
have_content
(
hook_url
)
end
end
it
'from hook edit page'
do
it
'from hook edit page'
do
visit
admin_hooks_path
visit
admin_hooks_path
click_link
'Edit'
click_link
'Edit'
expect
{
accept_confirm
{
find
(
:link
,
'Remove'
).
send_keys
(
:return
)
}
}.
to
change
(
SystemHook
,
:count
).
by
(
-
1
)
accept_confirm
{
click_link
'Remove'
}
expect
(
page
).
not_to
have_content
(
hook_url
)
end
end
end
end
end
end
...
...
spec/features/projects/members/user_requests_access_spec.rb
View file @
5f36bb92
...
@@ -62,8 +62,9 @@ describe 'Projects > Members > User requests access', :js do
...
@@ -62,8 +62,9 @@ describe 'Projects > Members > User requests access', :js do
accept_confirm
{
click_link
'Withdraw Access Request'
}
accept_confirm
{
click_link
'Withdraw Access Request'
}
expect
(
project
.
requesters
.
exists?
(
user_id:
user
)).
to
be_falsey
expect
(
page
).
to
have_content
'Your access request to the project has been withdrawn.'
expect
(
page
).
to
have_content
'Your access request to the project has been withdrawn.'
expect
(
page
).
not_to
have_content
'Withdraw Access Request'
expect
(
page
).
to
have_content
'Request Access'
end
end
def
open_project_settings_menu
def
open_project_settings_menu
...
...
spec/features/u2f_spec.rb
View file @
5f36bb92
...
@@ -246,26 +246,6 @@ describe 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
...
@@ -246,26 +246,6 @@ describe 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
end
end
end
end
end
end
describe
"when two-factor authentication is disabled"
do
let
(
:user
)
{
create
(
:user
)
}
before
do
user
=
gitlab_sign_in
(
:user
)
user
.
update_attribute
(
:otp_required_for_login
,
true
)
visit
profile_account_path
manage_two_factor_authentication
expect
(
page
).
to
have_content
(
"Your U2F device needs to be set up."
)
register_u2f_device
end
it
"deletes u2f registrations"
do
visit
profile_two_factor_auth_path
expect
do
accept_confirm
{
click_on
"Disable"
}
end
.
to
change
{
U2fRegistration
.
count
}.
by
(
-
1
)
end
end
end
end
describe
'fallback code authentication'
do
describe
'fallback code authentication'
do
...
...
spec/support/shared_examples/features/master_manages_access_requests_shared_example.rb
View file @
5f36bb92
...
@@ -19,7 +19,7 @@ RSpec.shared_examples 'Maintainer manages access requests' do
...
@@ -19,7 +19,7 @@ RSpec.shared_examples 'Maintainer manages access requests' do
expect_visible_access_request
(
entity
,
user
)
expect_visible_access_request
(
entity
,
user
)
accept_confirm
{
click_on
'Grant access'
}
click_on
'Grant access'
expect_no_visible_access_request
(
entity
,
user
)
expect_no_visible_access_request
(
entity
,
user
)
...
@@ -40,13 +40,11 @@ RSpec.shared_examples 'Maintainer manages access requests' do
...
@@ -40,13 +40,11 @@ RSpec.shared_examples 'Maintainer manages access requests' do
end
end
def
expect_visible_access_request
(
entity
,
user
)
def
expect_visible_access_request
(
entity
,
user
)
expect
(
entity
.
requesters
.
exists?
(
user_id:
user
)).
to
be_truthy
expect
(
page
).
to
have_content
"Users requesting access to
#{
entity
.
name
}
1"
expect
(
page
).
to
have_content
"Users requesting access to
#{
entity
.
name
}
1"
expect
(
page
).
to
have_content
user
.
name
expect
(
page
).
to
have_content
user
.
name
end
end
def
expect_no_visible_access_request
(
entity
,
user
)
def
expect_no_visible_access_request
(
entity
,
user
)
expect
(
entity
.
requesters
.
exists?
(
user_id:
user
)).
to
be_falsy
expect
(
page
).
not_to
have_content
"Users requesting access to
#{
entity
.
name
}
"
expect
(
page
).
not_to
have_content
"Users requesting access to
#{
entity
.
name
}
"
end
end
end
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