1bccd36f04
- 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
22 lines
449 B
Ruby
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
|