mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Add more page objects (#18972)
This commit is contained in:
18
spec/system/page_objects/pages/admin_settings.rb
Normal file
18
spec/system/page_objects/pages/admin_settings.rb
Normal file
@ -0,0 +1,18 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module PageObjects
|
||||
module Pages
|
||||
class AdminSettings < PageObjects::Pages::Base
|
||||
def visit_filtered_plugin_setting(filter)
|
||||
visit("/admin/site_settings/category/plugins?filter=#{filter}")
|
||||
self
|
||||
end
|
||||
|
||||
def toggle_setting(setting_name, text = '')
|
||||
setting = find(".admin-detail .row.setting[data-setting='#{setting_name}']")
|
||||
setting.find('.setting-value span', text: text).click
|
||||
setting.find('.setting-controls button.ok').click
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user