Commit 63763ac7 authored by Miguel Rincon's avatar Miguel Rincon

Add test for tags suggestions

This change adds a test to ensure tags suggestions are displayed.
parent b92d0d94
...@@ -364,6 +364,17 @@ RSpec.describe "Admin Runners" do ...@@ -364,6 +364,17 @@ RSpec.describe "Admin Runners" do
create(:ci_runner, :instance, description: 'runner-red', tag_list: ['red']) create(:ci_runner, :instance, description: 'runner-red', tag_list: ['red'])
end end
it 'shows tags suggestions' do
visit admin_runners_path
open_filtered_search_suggestions('Tags')
page.within(search_bar_selector) do
expect(page).to have_content 'blue'
expect(page).to have_content 'red'
end
end
it 'shows correct runner when tag matches' do it 'shows correct runner when tag matches' do
visit admin_runners_path visit admin_runners_path
...@@ -709,6 +720,16 @@ RSpec.describe "Admin Runners" do ...@@ -709,6 +720,16 @@ RSpec.describe "Admin Runners" do
wait_for_requests wait_for_requests
end end
def open_filtered_search_suggestions(filter)
focus_filtered_search
page.within(search_bar_selector) do
click_on filter
end
wait_for_requests
end
def input_filtered_search_filter_is_only(filter, value) def input_filtered_search_filter_is_only(filter, value)
focus_filtered_search focus_filtered_search
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment