discourse/spec/system/page_objects/modals/admin_search.rb
Krzysztof Kotlarek 07a4ffdf58
UX: display search input and open modal on click (#32508)
In this PR we hide search input.

https://github.com/discourse/discourse/pull/32485

However, search input is much more intuitive. Therefore, input was
brought back and opens modal on click. In addition, search link was
removed.
2025-05-01 10:12:12 +08:00

25 lines
595 B
Ruby
Vendored

# frozen_string_literal: true
module PageObjects
module Modals
class AdminSearch < PageObjects::Modals::Base
MODAL_SELECTOR = ".admin-search-modal"
def search(query)
find(".admin-search__input-field").fill_in(with: query)
end
def find_result(type, position)
all(".admin-search__result[data-result-type='#{type}']")[position]
end
def input_enter
find(".admin-search__input-field").send_keys(:enter)
end
def click_switch_to_full_page
find(".admin-search__full-page-link").click
end
end
end
end