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
3eed0d6a
Commit
3eed0d6a
authored
Nov 02, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spec for Epic keyboard shortcuts
parent
2cf82d19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
ee/spec/features/epics/shortcuts_epic_spec.rb
ee/spec/features/epics/shortcuts_epic_spec.rb
+60
-0
No files found.
ee/spec/features/epics/shortcuts_epic_spec.rb
0 → 100644
View file @
3eed0d6a
# frozen_string_literal: true
require
'spec_helper'
describe
'Epic shortcuts'
,
:js
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
,
:public
)
}
let
(
:label
)
{
create
(
:group_label
,
group:
group
,
title:
'bug'
)
}
let
(
:note_text
)
{
'I got this!'
}
let
(
:markdown
)
do
<<-
MARKDOWN
.
strip_heredoc
This is a task list:
- [ ] Incomplete entry 1
MARKDOWN
end
let
(
:epic
)
{
create
(
:epic
,
group:
group
,
title:
'make tea'
,
description:
markdown
)
}
before
do
group
.
add_developer
(
user
)
stub_licensed_features
(
epics:
true
)
sign_in
(
user
)
visit
group_epic_path
(
group
,
epic
)
end
describe
'pressing "l"'
do
it
"opens labels dropdown for editing"
do
find
(
'body'
).
native
.
send_key
(
'l'
)
expect
(
find
(
'.js-labels-block'
)).
to
have_selector
(
'.dropdown-menu-labels.show'
)
end
end
describe
'pressing "r"'
do
before
do
create
(
:note
,
noteable:
epic
,
note:
note_text
)
visit
group_epic_path
(
group
,
epic
)
wait_for_requests
end
it
"quotes the selected text"
do
select_element
(
'.note-text'
)
find
(
'body'
).
native
.
send_key
(
'r'
)
expect
(
find
(
'.js-main-target-form .js-vue-comment-form'
).
value
).
to
include
(
note_text
)
end
end
describe
'pressing "e"'
do
it
"starts editing mode for epic"
do
find
(
'body'
).
native
.
send_key
(
'e'
)
expect
(
find
(
'.detail-page-description'
)).
to
have_selector
(
'form input#issuable-title'
)
expect
(
find
(
'.detail-page-description'
)).
to
have_selector
(
'form textarea#issue-description'
)
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