mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-02 19:44:59 +08:00
Currently, clicking on a mention of user who has set a custom status causes the user card to fail to load. This happens because when the username is extracted from the mention `<a>` element, the space between the username and the status emoji is captured with the username and is sent to the server which fails to lookup the user due to the erroneously appended space. To fix this, we should cleanup the captured username and remove surrounding spaces using `trim()`.
15 lines
297 B
Ruby
15 lines
297 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
class UserCard < PageObjects::Components::Base
|
|
def visible?
|
|
has_css?("#user-card")
|
|
end
|
|
|
|
def showing_user?(username)
|
|
has_css?("#user-card.user-card-#{username}")
|
|
end
|
|
end
|
|
end
|
|
end
|