mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FEATURE: modal for admins to edit Community section (#21668)
Allow admins to edit Community section. This includes drag and drop reorder, change names, delete and reset to default. Visual improvements introduced in edit community section modal are available in edit custom section form as well. For example: - drag and drop links to change their position; - smaller icon picker.
This commit is contained in:

committed by
GitHub

parent
7d9a823a55
commit
9f78ff5572
@ -63,6 +63,10 @@ module PageObjects
|
||||
find(SIDEBAR_WRAPPER_SELECTOR).has_no_button?(name)
|
||||
end
|
||||
|
||||
def primary_section_links(slug)
|
||||
all("[data-section-name='#{slug}'] .sidebar-section-link-wrapper").map(&:text)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def section_link_present?(name, href: nil, active: false, present:)
|
||||
|
@ -25,7 +25,7 @@ module PageObjects
|
||||
|
||||
def click_community_header_button
|
||||
page.click_button(
|
||||
I18n.t("js.sidebar.sections.community.header_action_title"),
|
||||
I18n.t("js.sidebar.sections.community.header_action_create_topic_title"),
|
||||
class: "sidebar-section-header-button",
|
||||
)
|
||||
end
|
||||
|
@ -28,6 +28,11 @@ module PageObjects
|
||||
find(".dialog-container .btn-primary").click
|
||||
end
|
||||
|
||||
def reset
|
||||
find(".reset-link").click
|
||||
find(".dialog-footer .btn-primary").click
|
||||
end
|
||||
|
||||
def save
|
||||
find("#save-section").click
|
||||
end
|
||||
@ -39,9 +44,18 @@ module PageObjects
|
||||
def has_disabled_save?
|
||||
find_button("Save", disabled: true)
|
||||
end
|
||||
|
||||
def has_enabled_save?
|
||||
find_button("Save", disabled: false)
|
||||
end
|
||||
|
||||
def everything_link
|
||||
find(".draggable[data-link-name='Everything']")
|
||||
end
|
||||
|
||||
def review_link
|
||||
find(".draggable[data-link-name='Review']")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user