gitlab-org--gitlab-foss/spec/support/helpers/search_helpers.rb
Markus Koller 1bccd36f04 Improve search result labels
- Use "results" instead of "blobs", "wiki blobs", "snippet blobs"
- Use "comments" instead of "notes"
- Use correct pluralization
- Don't add "1 - 10 of" if there's only one page
2019-08-30 09:49:14 +00:00

22 lines
449 B
Ruby

# frozen_string_literal: true
module SearchHelpers
def submit_search(query, scope: nil)
page.within('.search-form, .search-page-form') do
field = find_field('search')
field.fill_in(with: query)
if javascript_test?
field.send_keys(:enter)
else
click_button('Search')
end
end
end
def select_search_scope(scope)
page.within '.search-filter' do
click_link scope
end
end
end