From f6c35239dd23bde71b70912e853bb5e07cf3eaea Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 13 Dec 2022 14:10:22 +0100 Subject: [PATCH] fix tests? --- plugins/chat/spec/system/transcript_spec.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/chat/spec/system/transcript_spec.rb b/plugins/chat/spec/system/transcript_spec.rb index 8a3159b7b6..65bcae10bd 100644 --- a/plugins/chat/spec/system/transcript_spec.rb +++ b/plugins/chat/spec/system/transcript_spec.rb @@ -117,7 +117,8 @@ RSpec.describe "Quoting chat message transcripts", type: :system, js: true do expect(page).to have_css(".chat-transcript") end topic_page.send_reply - expect(page).to have_no_selector(".topic-post.staged") + expect(page).to have_css(".post-stream") + expect(page).to have_no_css(".topic-post.staged") within topic_page.post_by_number(topic.posts.reload.last.post_number) do expect(page).to have_css(".chat-transcript") end @@ -139,7 +140,8 @@ RSpec.describe "Quoting chat message transcripts", type: :system, js: true do end expect(page).to have_content("Originally sent in #{chat_channel_1.name}") topic_page.send_reply - expect(page).to have_no_selector(".topic-post.staged") + expect(page).to have_css(".post-stream") + expect(page).to have_no_css(".topic-post.staged") within topic_page.post_by_number(topic.posts.reload.last.post_number) do expect(page).to have_css(".chat-transcript", count: 4) end @@ -211,7 +213,8 @@ RSpec.describe "Quoting chat message transcripts", type: :system, js: true do # create the topic with the transcript as the OP topic_page.fill_in_composer_title("Some topic title for testing") topic_page.send_reply - expect(page).to have_no_selector(".topic-post.staged") + expect(page).to have_css(".post-stream") + expect(page).to have_no_css(".topic-post.staged") topic = Topic.where(user: current_user).last expect(page).to have_current_path(topic.url) within(topic_page.post_by_number(1)) { expect(page).to have_css(".chat-transcript") }