mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 08:15:49 +08:00
aa88b07640
Continued work on moderate flags UI. In this PR admins are allowed to change the order of flags. The notify user flag is always on top but all other flags can be moved.
26 lines
578 B
Ruby
26 lines
578 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class AdminFlags < PageObjects::Pages::Base
|
|
def toggle(key)
|
|
PageObjects::Components::DToggleSwitch.new(".admin-flag-item__toggle.#{key}").toggle
|
|
end
|
|
|
|
def open_flag_menu(key)
|
|
find(".#{key} .flag-menu-trigger").click
|
|
end
|
|
|
|
def move_down(key)
|
|
open_flag_menu(key)
|
|
find(".dropdown-menu__item .move-down").click
|
|
end
|
|
|
|
def move_up(key)
|
|
open_flag_menu(key)
|
|
find(".dropdown-menu__item .move-up").click
|
|
end
|
|
end
|
|
end
|
|
end
|