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:
Krzysztof Kotlarek
2023-03-07 11:47:18 +11:00
committed by GitHub
parent b4528b9e27
commit a16ea24461
13 changed files with 153 additions and 31 deletions

View File

@ -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