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
e4e39814
Commit
e4e39814
authored
May 08, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace wait_for_ajax with wait_for_vue_resource on approvals spec
parent
a6385088
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
spec/features/merge_requests/approvals_spec.rb
spec/features/merge_requests/approvals_spec.rb
+10
-10
No files found.
spec/features/merge_requests/approvals_spec.rb
View file @
e4e39814
require
'rails_helper'
feature
'Merge request approvals'
,
js:
true
,
feature:
true
do
include
WaitFor
Ajax
include
WaitFor
VueResource
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
approvals_before_merge:
1
)
}
...
...
@@ -74,7 +74,7 @@ feature 'Merge request approvals', js: true, feature: true do
visit
new_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request:
{
target_branch:
'master'
,
source_branch:
'feature'
})
find
(
'#s2id_merge_request_approver_group_ids .select2-input'
).
click
wait_for_
ajax
wait_for_
vue_resource
expect
(
find
(
'.select2-results'
)).
to
have_content
(
group
.
name
)
...
...
@@ -103,7 +103,7 @@ feature 'Merge request approvals', js: true, feature: true do
click_on
(
"Submit merge request"
)
wait_for_
ajax
wait_for_
vue_resource
expect
(
page
).
not_to
have_selector
(
".approvals-required-text a[title='
#{
other_user
.
name
}
']"
)
expect
(
page
).
to
have_selector
(
".approvals-required-text a[title='
#{
approver
.
name
}
']"
)
...
...
@@ -129,14 +129,14 @@ feature 'Merge request approvals', js: true, feature: true do
visit
edit_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
find
(
'#s2id_merge_request_approver_group_ids .select2-input'
).
click
wait_for_
ajax
wait_for_
vue_resource
expect
(
find
(
'.select2-results'
)).
to
have_content
(
group
.
name
)
find
(
'.select2-results'
).
click
click_on
(
"Save changes"
)
wait_for_
ajax
wait_for_
vue_resource
find
(
'.approvals-components'
)
expect
(
page
).
to
have_content
(
"Requires 1 more approval"
)
end
...
...
@@ -236,7 +236,7 @@ feature 'Merge request approvals', js: true, feature: true do
it
'I am able to approve'
do
approve_merge_request
wait_for_
ajax
wait_for_
vue_resource
expect
(
page
).
to
have_content
(
'Approved by'
)
expect
(
page
).
to
have_css
(
'.approver-avatar'
)
end
...
...
@@ -259,7 +259,7 @@ feature 'Merge request approvals', js: true, feature: true do
# before approval status is loaded
expect
(
page
).
to
have_button
(
'Merge when pipeline succeeds'
,
disabled:
true
)
wait_for_
ajax
wait_for_
vue_resource
# after approval status is loaded
expect
(
page
).
to
have_button
(
'Merge when pipeline succeeds'
,
disabled:
true
)
...
...
@@ -285,7 +285,7 @@ feature 'Merge request approvals', js: true, feature: true do
# before approval status is loaded
expect
(
page
).
to
have_button
(
"Rebase"
,
disabled:
true
)
wait_for_
ajax
wait_for_
vue_resource
# after approval status is loaded
expect
(
page
).
to
have_button
(
"Rebase"
,
disabled:
true
)
...
...
@@ -320,12 +320,12 @@ def approve_merge_request
page
.
within
'.mr-state-widget'
do
find
(
'.approve-btn'
).
click
end
wait_for_
ajax
wait_for_
vue_resource
end
def
unapprove_merge_request
page
.
within
'.mr-state-widget'
do
find
(
'.unapprove-btn-wrap'
).
click
end
wait_for_
ajax
wait_for_
vue_resource
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