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
Tatuya Kamada
gitlab-ce
Commits
735731a5
Commit
735731a5
authored
Oct 03, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests update
parent
cc88fa4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
app/views/shared/issuable/_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+1
-1
spec/features/issues/filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+13
-6
No files found.
app/views/shared/issuable/_label_dropdown.html.haml
View file @
735731a5
...
...
@@ -15,7 +15,7 @@
-
if
selected
-
selected
.
each
do
|
label
|
=
hidden_field_tag
data_options
[
:field_name
],
use_id
?
label
.
try
(
:id
)
:
u
(
label
.
try
(
:title
)
),
id:
nil
=
hidden_field_tag
data_options
[
:field_name
],
use_id
?
label
.
try
(
:id
)
:
label
.
try
(
:title
),
id:
nil
.dropdown
%button
.dropdown-menu-toggle.js-label-select.js-multiselect
{
class:
classes
.
join
(
' '
),
type:
"button"
,
data:
dropdown_data
}
...
...
spec/features/issues/filter_issues_spec.rb
View file @
735731a5
...
...
@@ -110,30 +110,37 @@ describe 'Filter issues', feature: true do
end
it
"filters by `won't fix` and another label"
do
find
(
'.dropdown-menu-labels a'
,
text:
label
.
title
).
click
page
.
within
'.labels-filter'
do
expect
(
page
).
to
have_content
wontfix
.
title
click_link
wontfix
.
title
expect
(
page
).
to
have_content
wontfix
.
title
click_link
label
.
title
end
expect
(
find
(
'.js-label-select .dropdown-toggle-text'
)).
to
have_content
(
wontfix
.
title
)
expect
(
find
(
'.js-label-select .dropdown-toggle-text'
)).
to
have_content
(
"
#{
wontfix
.
title
}
+1 more"
)
end
it
"filters by `won't fix` label followed by another label after page load"
do
find
(
'.dropdown-menu-labels a'
,
text:
wontfix
.
title
).
click
# Close label dropdown to load
page
.
within
'.labels-filter'
do
click_link
wontfix
.
title
expect
(
page
).
to
have_content
wontfix
.
title
end
find
(
'body'
).
click
expect
(
find
(
'.filtered-labels'
)).
to
have_content
(
wontfix
.
title
)
find
(
'.js-label-select'
).
click
wait_for_ajax
find
(
'.dropdown-menu-labels a'
,
text:
label
.
title
).
click
# Close label dropdown to load
find
(
'body'
).
click
expect
(
find
(
'.filtered-labels'
)).
to
have_content
(
wontfix
.
title
)
expect
(
find
(
'.filtered-labels'
)).
to
have_content
(
label
.
title
)
find
(
'.js-label-select'
).
click
wait_for_ajax
expect
(
find
(
'.dropdown-menu-labels li'
,
text:
wontfix
.
title
)).
to
have_css
(
'.is-active'
)
expect
(
find
(
'.dropdown-menu-labels li'
,
text:
label
.
title
)).
to
have_css
(
'.is-active'
)
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