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
4201d428
Commit
4201d428
authored
Jul 17, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge cherry-pick modal specs
parent
29cf2e08
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
28 deletions
+21
-28
spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb
...es/merge_request/user_sees_check_out_branch_modal_spec.rb
+1
-1
spec/features/merge_request/user_sees_cherry_pick_modal_spec.rb
...eatures/merge_request/user_sees_cherry_pick_modal_spec.rb
+20
-2
spec/features/user_sees_cherry_pick_modal_spec.rb
spec/features/user_sees_cherry_pick_modal_spec.rb
+0
-25
No files found.
spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb
View file @
4201d428
...
...
@@ -16,7 +16,7 @@ describe 'Merge request > User sees check out branch modal', :js do
expect
(
page
).
to
have_content
(
'Check out, review, and merge locally'
)
end
it
'closes the check out branch modal with
E
scape keypress'
do
it
'closes the check out branch modal with
e
scape keypress'
do
find
(
'#modal_merge_info'
).
send_keys
(
:escape
)
expect
(
page
).
not_to
have_content
(
'Check out, review, and merge locally'
)
...
...
spec/features/merge_request/user_
cherry_picks
_spec.rb
→
spec/features/merge_request/user_
sees_cherry_pick_modal
_spec.rb
View file @
4201d428
...
...
@@ -21,7 +21,7 @@ describe 'Merge request > User cherry-picks', :js do
end
# Fast-forward merge, or merged before GitLab 8.5.
context
'
W
ithout a merge commit'
do
context
'
w
ithout a merge commit'
do
before
do
merge_request
.
merge_commit_sha
=
nil
merge_request
.
save
...
...
@@ -34,7 +34,7 @@ describe 'Merge request > User cherry-picks', :js do
end
end
context
'
W
ith a merge commit'
do
context
'
w
ith a merge commit'
do
it
'shows a Cherry-pick button'
do
visit
project_merge_request_path
(
project
,
merge_request
)
...
...
@@ -49,5 +49,23 @@ describe 'Merge request > User cherry-picks', :js do
expect
(
page
).
not_to
have_link
'Cherry-pick'
end
end
context
'and seeing the cherry-pick modal'
do
before
do
visit
project_merge_request_path
(
project
,
merge_request
)
click_link
(
'Cherry-pick'
)
end
it
'shows the cherry-pick modal'
do
expect
(
page
).
to
have_content
(
'Cherry-pick this merge request'
)
end
it
'closes the cherry-pick modal with escape keypress'
do
find
(
'#modal-cherry-pick-commit'
).
send_keys
(
:escape
)
expect
(
page
).
not_to
have_content
(
'Start a new merge request with these changes'
)
end
end
end
end
spec/features/user_sees_cherry_pick_modal_spec.rb
deleted
100644 → 0
View file @
29cf2e08
require
'rails_helper'
describe
'Merge request > User sees cherry-pick modal'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:user
)
{
project
.
creator
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
before
do
sign_in
(
user
)
visit
(
project_merge_request_path
(
project
,
merge_request
))
click_button
(
'Merge'
)
visit
(
merge_request_path
(
merge_request
))
click_link
(
'Cherry-pick'
)
end
it
'shows the cherry-pick modal'
do
expect
(
page
).
to
have_content
(
'Cherry-pick this merge request'
)
end
it
'closes the cherry-pick modal with escape keypress'
do
find
(
'#modal-cherry-pick-commit'
).
send_keys
(
:escape
)
expect
(
page
).
not_to
have_content
(
'Start a new merge request with these changes'
)
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