mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 09:08:10 +08:00
FEATURE: allow external links in custom sidebar sections (#20503)
Originally, only Discourse site links were available. After feedback, it was decided to extend this feature to external URLs. /t/93491
This commit is contained in:

committed by
GitHub

parent
b4528b9e27
commit
a16ea24461
@ -23,6 +23,16 @@ module PageObjects
|
||||
find(".sidebar-section-#{name.parameterize}").hover
|
||||
find(".sidebar-section-#{name.parameterize} button.sidebar-section-header-button").click
|
||||
end
|
||||
|
||||
def has_link?(name, href: nil)
|
||||
attributes = {}
|
||||
attributes[:href] = href if href
|
||||
page.has_link?(name, attributes)
|
||||
end
|
||||
|
||||
def custom_section_modal_title
|
||||
find("#discourse-modal-title")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user