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
9c53af12
Commit
9c53af12
authored
Oct 17, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filtered Search Tokens Spec for Epics
parent
d834125f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
0 deletions
+83
-0
ee/spec/features/epics/filtered_search/visual_tokens_spec.rb
ee/spec/features/epics/filtered_search/visual_tokens_spec.rb
+83
-0
No files found.
ee/spec/features/epics/filtered_search/visual_tokens_spec.rb
0 → 100644
View file @
9c53af12
require
'spec_helper'
describe
'epics list'
,
:js
do
include
FilteredSearchHelpers
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
,
:public
)
}
let
(
:label
)
{
create
(
:group_label
,
group:
group
,
title:
'bug'
)
}
let!
(
:epic
)
{
create
(
:epic
,
group:
group
,
start_date:
10
.
days
.
ago
,
due_date:
5
.
days
.
ago
)
}
let
(
:filtered_search
)
{
find
(
'.filtered-search'
)
}
let
(
:filter_author_dropdown
)
{
find
(
"#js-dropdown-author .filter-dropdown"
)
}
let
(
:filter_label_dropdown
)
{
find
(
"#js-dropdown-label .filter-dropdown"
)
}
before
do
stub_licensed_features
(
epics:
true
)
sign_in
(
user
)
visit
group_epics_path
(
group
)
end
context
'editing author token'
do
before
do
input_filtered_search
(
'author:@root'
,
submit:
false
)
first
(
'.tokens-container .filtered-search-token'
).
click
end
it
'converts keyword into visual token'
do
page
.
within
(
'.tokens-container'
)
do
expect
(
page
).
to
have_selector
(
'.js-visual-token'
)
expect
(
page
).
to
have_content
(
'Author'
)
end
end
it
'opens author dropdown'
do
expect
(
page
).
to
have_css
(
'#js-dropdown-author'
,
visible:
true
)
end
it
'makes value editable'
do
expect_filtered_search_input
(
'@root'
)
end
it
'filters value'
do
filtered_search
.
send_keys
(
:backspace
)
expect
(
page
).
to
have_css
(
'#js-dropdown-author .filter-dropdown .filter-dropdown-item'
,
count:
1
)
end
end
context
'editing label token'
do
before
do
input_filtered_search
(
"label:~
#{
label
.
title
}
"
,
submit:
false
)
first
(
'.tokens-container .filtered-search-token'
).
click
end
it
'converts keyword into visual token'
do
page
.
within
(
'.tokens-container'
)
do
expect
(
page
).
to
have_selector
(
'.js-visual-token'
)
expect
(
page
).
to
have_content
(
'Label'
)
end
end
it
'opens label dropdown'
do
expect
(
filter_label_dropdown
.
find
(
'.filter-dropdown-item'
,
text:
label
.
title
)).
to
be_visible
expect
(
page
).
to
have_css
(
'#js-dropdown-label'
,
visible:
true
)
end
it
'makes value editable'
do
expect_filtered_search_input
(
"~
#{
label
.
title
}
"
)
end
it
'filters value'
do
expect
(
filter_label_dropdown
.
find
(
'.filter-dropdown-item'
,
text:
label
.
title
)).
to
be_visible
filtered_search
.
send_keys
(
:backspace
)
filter_label_dropdown
.
find
(
'.filter-dropdown-item'
)
expect
(
page
.
all
(
'#js-dropdown-label .filter-dropdown .filter-dropdown-item'
).
size
).
to
eq
(
1
)
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