mirror of
https://github.com/discourse/discourse.git
synced 2026-08-13 06:25:11 -05:00
FEATURE: Add keywords support for site_settings search (#24146)
* FEATURE: Add keywords support for site_settings search
This change allows for a new `keywords` field that can be added to site
settings in order to help with searching. Keywords are not visible in
the UI, but site settings matching one of the contained keywords will
appear when searching for that keyword.
Keywords can be added for site settings inside of the
`config/locales/server.en.yml` file under the new `keywords` key.
```
site_settings
example_1: "fancy description"
example_2: "another description"
keywords:
example_1: "capybara"
```
* Add keywords entry for a recently changed site setting and add system specs
* Use page.visit now that we have our own visit
This commit is contained in:
@@ -4,7 +4,12 @@ module PageObjects
|
||||
module Pages
|
||||
class AdminSettings < PageObjects::Pages::Base
|
||||
def visit_filtered_plugin_setting(filter)
|
||||
visit("/admin/site_settings/category/plugins?filter=#{filter}")
|
||||
page.visit("/admin/site_settings/category/plugins?filter=#{filter}")
|
||||
self
|
||||
end
|
||||
|
||||
def visit
|
||||
page.visit("/admin/site_settings")
|
||||
self
|
||||
end
|
||||
|
||||
@@ -34,6 +39,15 @@ module PageObjects
|
||||
.map { |e| vals << e.text }
|
||||
vals
|
||||
end
|
||||
|
||||
def type_in_search(input)
|
||||
find("input#setting-filter").send_keys(input)
|
||||
self
|
||||
end
|
||||
|
||||
def has_search_result?(setting)
|
||||
page.has_selector?("div[data-setting='#{setting}']")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user