FIX: targeting chat-message-text is more reliable (#24245)
This commit is contained in:
parent
e2f094dd05
commit
2bd4cf69d0
|
@ -60,12 +60,11 @@ module PageObjects
|
|||
text = args[:text]
|
||||
text = I18n.t("js.chat.deleted", count: args[:deleted]) if args[:deleted]
|
||||
|
||||
if text
|
||||
@component =
|
||||
find(context).find("#{selector} .chat-message-text", text: /#{Regexp.escape(text)}/)
|
||||
else
|
||||
@component = page.find(context).find(selector)
|
||||
end
|
||||
page.find(
|
||||
"#{context} #{selector} .chat-message-text",
|
||||
text: text ? /#{Regexp.escape(text)}/ : nil,
|
||||
)
|
||||
|
||||
self
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue