FIX: correctly highlights message on reply click (#24431)
This commit is contained in:
parent
878b9ce549
commit
2b7ecee06e
|
@ -11,6 +11,7 @@
|
|||
{{did-insert this.didUpdateChannel}}
|
||||
{{did-insert this.addAutoFocusEventListener}}
|
||||
{{will-destroy this.removeAutoFocusEventListener}}
|
||||
{{did-update this.loadMessages @targetMessageId}}
|
||||
data-id={{@channel.id}}
|
||||
>
|
||||
<ChatFullPageHeader
|
||||
|
|
|
@ -99,4 +99,19 @@ RSpec.describe "Chat | composer | channel", type: :system, js: true do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "when click on reply indicator" do
|
||||
before do
|
||||
Fabricate(:chat_message, chat_channel: channel_1)
|
||||
Fabricate(:chat_message, chat_channel: channel_1, in_reply_to: message_1)
|
||||
end
|
||||
|
||||
it "highlights the message" do
|
||||
chat_page.visit_channel(channel_1)
|
||||
|
||||
page.find(".chat-reply").click
|
||||
|
||||
expect(channel_page.messages).to have_message(id: message_1.id, highlighted: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -104,6 +104,7 @@ module PageObjects
|
|||
selector += ".-persisted" if args[:persisted]
|
||||
selector += ".-staged" if args[:staged]
|
||||
selector += ".-deleted" if args[:deleted]
|
||||
selector += ".-highlighted" if args[:highlighted]
|
||||
selector
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue