mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 07:37:55 +08:00
UI: redesigned settings/members (#23804)
This PR is a first step towards private groups. It redesigns settings/members area of a channel and also drops the "about" page which is now mixed into settings. This commit is also: - introducing chat-form, a small DSL to create forms, ideally I would want something in core for this - introducing a DToggleSwitch page object component to simplify testing toggles - migrating various components to gjs
This commit is contained in:
22
spec/system/page_objects/components/d_toggle_switch.rb
Normal file
22
spec/system/page_objects/components/d_toggle_switch.rb
Normal file
@ -0,0 +1,22 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module PageObjects
|
||||
module Components
|
||||
class DToggleSwitch < PageObjects::Components::Base
|
||||
attr_reader :context
|
||||
|
||||
def initialize(context)
|
||||
@context = context
|
||||
end
|
||||
|
||||
def component
|
||||
find(@context, visible: :all).native
|
||||
end
|
||||
|
||||
def toggle
|
||||
actionbuilder = page.driver.browser.action # workaround zero height button
|
||||
actionbuilder.click(component).perform
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user