discourse/spec/system/page_objects/components/d_toggle_switch.rb

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

23 lines
473 B
Ruby
Raw Normal View History

# 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