mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-28 07:19:11 +08:00
The reply icon in the user menu was not being flipped for RTL languages. The RTL stylesheet targets `.d-icon-reply` with `transform: scaleX(-1)`, but the icon rendered with class `d-icon-user_menu.replies` instead — the dot made the CSS selector never match. The `iconClasses` function only replaced dotted icon IDs with their mapped replacement for class names when the ID contained "notification.". Other namespaced IDs like "user_menu.replies" and "user_menu.drafts" were used as-is, producing invalid CSS class names. Broadened the condition to replace any icon ID containing a dot, since dots are invalid in CSS class selectors regardless of the namespace. **BEFORE** <img width="1376" height="1164" alt="2026-03-19 @ 09 52 09" src="https://github.com/user-attachments/assets/dbc2be67-2bdf-416e-9eff-c99593af66f8" /> **AFTER** <img width="1376" height="1164" alt="2026-03-19 @ 09 52 00" src="https://github.com/user-attachments/assets/11ecfcc9-2935-4f10-af78-55a9bb3cb4aa" /> https://meta.discourse.org/t/398766
29 lines
848 B
Ruby
Vendored
29 lines
848 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
module Review
|
|
class TopicLink < PageObjects::Components::Base
|
|
WRAPPER_CSS = ".review-item__meta-topic-title"
|
|
|
|
def has_closed_topic_status?
|
|
within(WRAPPER_CSS) { has_css?(".topic-status [class*='d-icon-lock']") }
|
|
end
|
|
|
|
def has_topic_link?(topic_title:, post_url:)
|
|
within(WRAPPER_CSS) { expect(page).to have_link(topic_title, href: post_url) }
|
|
end
|
|
|
|
def has_category_badge?(category_name)
|
|
within(WRAPPER_CSS) do
|
|
expect(page).to have_css(".badge-category__name", text: category_name)
|
|
end
|
|
end
|
|
|
|
def has_tag_link?(tag_name:, tag_url:)
|
|
within(WRAPPER_CSS) { expect(page).to have_link(tag_name, href: tag_url) }
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|