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
29cf2e08
Commit
29cf2e08
authored
Jul 03, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for closing cherry-pick modal on escape keypress
parent
f0f65047
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
4 deletions
+34
-4
changelogs/unreleased/close-revert-and-cherry-pick-modal-on-escape-keypress.yml
...close-revert-and-cherry-pick-modal-on-escape-keypress.yml
+5
-0
spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb
...es/merge_request/user_sees_check_out_branch_modal_spec.rb
+2
-2
spec/features/user_sees_cherry_pick_modal_spec.rb
spec/features/user_sees_cherry_pick_modal_spec.rb
+25
-0
spec/features/user_sees_revert_modal_spec.rb
spec/features/user_sees_revert_modal_spec.rb
+2
-2
No files found.
changelogs/unreleased/close-revert-and-cherry-pick-modal-on-escape-keypress.yml
0 → 100644
View file @
29cf2e08
---
title
:
Close revert and cherry pick modal on escape keypress
merge_request
:
20341
author
:
George Tsiolis
type
:
changed
spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb
View file @
29cf2e08
require
'rails_helper'
require
'rails_helper'
describe
'Merge request > User sees
C
heck out branch modal'
,
:js
do
describe
'Merge request > User sees
c
heck out branch modal'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:user
)
{
project
.
creator
}
let
(
:user
)
{
project
.
creator
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
...
@@ -16,7 +16,7 @@ describe 'Merge request > User sees Check out branch modal', :js do
...
@@ -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'
)
expect
(
page
).
to
have_content
(
'Check out, review, and merge locally'
)
end
end
it
'closes the check out branch mod
e
l with Escape keypress'
do
it
'closes the check out branch mod
a
l with Escape keypress'
do
find
(
'#modal_merge_info'
).
send_keys
(
:escape
)
find
(
'#modal_merge_info'
).
send_keys
(
:escape
)
expect
(
page
).
not_to
have_content
(
'Check out, review, and merge locally'
)
expect
(
page
).
not_to
have_content
(
'Check out, review, and merge locally'
)
...
...
spec/features/user_sees_cherry_pick_modal_spec.rb
0 → 100644
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
spec/features/user_sees_revert_modal_spec.rb
View file @
29cf2e08
require
'rails_helper'
require
'rails_helper'
describe
'Merge request > User sees
R
evert modal'
,
:js
do
describe
'Merge request > User sees
r
evert modal'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:user
)
{
project
.
creator
}
let
(
:user
)
{
project
.
creator
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
before
do
before
do
sign_in
(
user
)
sign_in
(
user
)
visit
project_merge_request_path
(
project
,
merge_request
)
visit
(
project_merge_request_path
(
project
,
merge_request
)
)
click_button
(
'Merge'
)
click_button
(
'Merge'
)
visit
(
merge_request_path
(
merge_request
))
visit
(
merge_request_path
(
merge_request
))
click_link
(
'Revert'
)
click_link
(
'Revert'
)
...
...
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