提交 a6ba94db 编写于 作者: P Phil Hughes

Filtering by any label keeps the text on the toggle button

上级 122b4148
......@@ -218,7 +218,7 @@ class @LabelsSelect
selectable: true
toggleLabel: (selected) ->
if selected and selected.title isnt 'Any Label'
if selected and selected.title?
selected.title
else
defaultLabel
......
......@@ -84,16 +84,25 @@ describe 'Filter issues', feature: true do
it 'should filter by any label' do
find('.dropdown-menu-labels a', text: 'Any Label').click
page.within '.labels-filter' do
expect(page).to have_content 'Any Label'
end
expect(find('.js-label-select .dropdown-toggle-text')).to have_content('Label')
end
it 'should filter by no label' do
find('.dropdown-menu-labels a', text: 'No Label').click
page.within '.labels-filter' do
expect(page).to have_content 'No Label'
end
expect(find('.js-label-select .dropdown-toggle-text')).to have_content('No Label')
end
it 'should filter by no label' do
find('.dropdown-menu-labels a', text: label.title).click
page.within '.labels-filter' do
expect(page).to have_content label.title
end
expect(find('.js-label-select .dropdown-toggle-text')).to have_content(label.title)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册