discourse/spec/system/page_objects/pages/admin_settings.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
543 B
Ruby
Raw Normal View History

2022-11-11 17:44:40 +08:00
# 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