discourse/spec/system/page_objects/pages/admin_flags.rb
Krzysztof Kotlarek aa88b07640
FEATURE: the ability to change the order of flags (#27269)
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.
2024-06-05 13:27:06 +10:00

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