DEV: Re-enable chat transcript nested system spec (#19758)

The problem here was that if your input has an Enter
listener (such as the chat message input) and the
`fill_in(with: str)` string has a `\n` at the end, this
is treated as an Enter keypress, so this `fill_in` was
submitting the chat message.
This commit is contained in:
Martin Brennan 2023-01-06 09:04:38 +10:00 committed by GitHub
parent 80164322e0
commit 6977761593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -69,6 +69,7 @@ module PageObjects
end
def send_message(text = nil)
text = text.chomp if text.present? # having \n on the end of the string counts as an Enter keypress
find(".chat-composer-input").click # makes helper more reliable by ensuring focus is not lost
find(".chat-composer-input").fill_in(with: text)
click_send_message

View File

@ -173,7 +173,7 @@ RSpec.describe "Quoting chat message transcripts", type: :system, js: true do
context "when quoting a message in another message" do
fab!(:message_1) { Fabricate(:chat_message, chat_channel: chat_channel_1) }
xit "quotes the message" do
it "quotes the message" do
chat_page.visit_channel(chat_channel_1)
expect(chat_channel_page).to have_no_loading_skeleton