diff options
author | Sean McGivern <sean@gitlab.com> | 2018-11-01 14:07:09 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-11-01 14:07:09 +0300 |
commit | c49f57fe430edeac9a5f2423dac7afb80ff72576 (patch) | |
tree | 23c8e45711083748f18d81a9f40f3b464e4b62cb /spec/features | |
parent | f7c0a18b8a061bfea650897b22dce24d712c6439 (diff) | |
parent | 8df7e6021b0da30e3b7550ca83cd9ab3f991c235 (diff) |
Merge branch 'engwan/gitlab-ce-44012-filter-reactions-none-any'
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/issues/filtered_search/dropdown_emoji_spec.rb | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/spec/features/issues/filtered_search/dropdown_emoji_spec.rb b/spec/features/issues/filtered_search/dropdown_emoji_spec.rb index be229e8aa7d..c42fcd92a36 100644 --- a/spec/features/issues/filtered_search/dropdown_emoji_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_emoji_spec.rb @@ -92,7 +92,7 @@ describe 'Dropdown emoji', :js do it 'shows the most populated emoji at top of dropdown' do send_keys_to_filtered_search('my-reaction:') - expect(first('#js-dropdown-my-reaction li')).to have_content(award_emoji_star.name) + expect(first('#js-dropdown-my-reaction .filter-dropdown li')).to have_content(award_emoji_star.name) end end @@ -121,13 +121,29 @@ describe 'Dropdown emoji', :js do send_keys_to_filtered_search(':') end + it 'selects `None`' do + find('#js-dropdown-my-reaction .filter-dropdown-item', text: 'None').click + + expect(page).to have_css(js_dropdown_emoji, visible: false) + expect_tokens([reaction_token('none', false)]) + expect_filtered_search_input_empty + end + + it 'selects `Any`' do + find('#js-dropdown-my-reaction .filter-dropdown-item', text: 'Any').click + + expect(page).to have_css(js_dropdown_emoji, visible: false) + expect_tokens([reaction_token('any', false)]) + expect_filtered_search_input_empty + end + it 'fills in the my-reaction name' do click_emoji('thumbsup') wait_for_requests expect(page).to have_css(js_dropdown_emoji, visible: false) - expect_tokens([emoji_token('thumbsup')]) + expect_tokens([reaction_token('thumbsup')]) expect_filtered_search_input_empty end end |