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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
511485e6
Commit
511485e6
authored
Jun 06, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace wait_for_ajax with wait_for_requests
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
76089b94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
spec/features/protected_tags_spec.rb
spec/features/protected_tags_spec.rb
+1
-1
spec/support/protected_tags/access_control_ee_spec.rb
spec/support/protected_tags/access_control_ee_spec.rb
+7
-7
No files found.
spec/features/protected_tags_spec.rb
View file @
511485e6
...
...
@@ -9,7 +9,7 @@ feature 'Projected Tags', feature: true, js: true do
def
set_allowed_to
(
operation
,
option
=
'Masters'
,
form:
'.new-protected-tag'
)
within
form
do
find
(
".js-allowed-to-
#{
operation
}
"
).
click
wait_for_
ajax
wait_for_
requests
Array
(
option
).
each
{
|
opt
|
click_on
(
opt
)
}
...
...
spec/support/protected_tags/access_control_ee_spec.rb
View file @
511485e6
...
...
@@ -54,7 +54,7 @@ RSpec.shared_examples "protected tags > access control > EE" do
set_allowed_to
(
'create'
,
groups
.
map
(
&
:name
),
form:
".js-protected-tag-edit-form"
)
set_allowed_to
(
'create'
,
roles
.
values
,
form:
".js-protected-tag-edit-form"
)
wait_for_
ajax
wait_for_
requests
expect
(
ProtectedTag
.
count
).
to
eq
(
1
)
...
...
@@ -78,7 +78,7 @@ RSpec.shared_examples "protected tags > access control > EE" do
groups
.
each
{
|
group
|
set_allowed_to
(
'create'
,
group
.
name
,
form:
".js-protected-tag-edit-form"
)
}
roles
.
each
{
|
(
_
,
access_type_name
)
|
set_allowed_to
(
'create'
,
access_type_name
,
form:
".js-protected-tag-edit-form"
)
}
wait_for_
ajax
wait_for_
requests
expect
(
ProtectedTag
.
count
).
to
eq
(
1
)
expect
(
access_type_ids
).
to
be_empty
...
...
@@ -107,13 +107,13 @@ RSpec.shared_examples "protected tags > access control > EE" do
expect
(
all
(
'.dropdown-header'
)[
index
]).
to
have_content
(
header
)
end
wait_for_
ajax
wait_for_
requests
click_on
users
.
last
.
name
find
(
".js-allowed-to-create"
).
click
# close
end
wait_for_
ajax
wait_for_
requests
# Verify the user is appended in the dropdown
find
(
".protected-tags-list .js-allowed-to-create"
).
click
...
...
@@ -133,7 +133,7 @@ RSpec.shared_examples "protected tags > access control > EE" do
click_on
"Protect"
wait_for_
ajax
wait_for_
requests
roles
.
each
do
|
(
access_type_id
,
_
)
|
expect
(
access_levels
).
to
include
(
access_type_id
)
...
...
@@ -143,7 +143,7 @@ RSpec.shared_examples "protected tags > access control > EE" do
set_allowed_to
(
'create'
,
'No one'
,
form:
'.js-protected-tag-edit-form'
)
wait_for_
ajax
wait_for_
requests
roles
.
each
do
|
(
access_type_id
,
_
)
|
expect
(
access_levels
).
not_to
include
(
access_type_id
)
...
...
@@ -162,7 +162,7 @@ RSpec.shared_examples "protected tags > access control > EE" do
click_on
"Protect"
wait_for_
ajax
wait_for_
requests
roles
.
each
do
|
(
access_type_id
,
_
)
|
expect
(
access_levels
).
not_to
include
(
access_type_id
)
...
...
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