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 = args[:text]
|
||||||
text = I18n.t("js.chat.deleted", count: args[:deleted]) if args[:deleted]
|
text = I18n.t("js.chat.deleted", count: args[:deleted]) if args[:deleted]
|
||||||
|
|
||||||
if text
|
|
||||||
@component =
|
@component =
|
||||||
find(context).find("#{selector} .chat-message-text", text: /#{Regexp.escape(text)}/)
|
page.find(
|
||||||
else
|
"#{context} #{selector} .chat-message-text",
|
||||||
@component = page.find(context).find(selector)
|
text: text ? /#{Regexp.escape(text)}/ : nil,
|
||||||
end
|
)
|
||||||
|
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue