DEV: simplify reply to message smoke spec (#23928)

We now create threads on reply so the refresh check is not really necessary as there's nothing special about it anymore. We don't refresh every pages in other tests to check they still work.

Hopefully these changes will prevent few flakeys too.
This commit is contained in:
Joffrey JAFFEUX 2023-10-13 11:16:26 +02:00 committed by GitHub
parent c1abf8b35c
commit b6d9aa5a4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,8 +34,7 @@ RSpec.describe "Reply to message - smoke", type: :system do
end
using_session(:user_1) do
thread_page.fill_composer("user1reply")
thread_page.click_send_message
thread_page.send_message("user1reply")
expect(channel_page.message_thread_indicator(original_message)).to have_reply_count(1)
expect(thread_page.messages).to have_message(text: "user1reply")
@ -45,13 +44,7 @@ RSpec.describe "Reply to message - smoke", type: :system do
expect(thread_page.messages).to have_message(text: "user1reply")
expect(channel_page.message_thread_indicator(original_message)).to have_reply_count(1)
thread_page.fill_composer("user2reply")
thread_page.click_send_message
expect(thread_page.messages).to have_message(text: "user2reply")
expect(channel_page.message_thread_indicator(original_message)).to have_reply_count(2)
refresh
thread_page.send_message("user2reply")
expect(thread_page.messages).to have_message(text: "user1reply")
expect(thread_page.messages).to have_message(text: "user2reply")
@ -61,11 +54,6 @@ RSpec.describe "Reply to message - smoke", type: :system do
end
using_session(:user_1) do |session|
expect(thread_page.messages).to have_message(text: "user2reply")
expect(channel_page.message_thread_indicator(original_message)).to have_reply_count(2)
refresh
expect(thread_page.messages).to have_message(text: "user1reply")
expect(thread_page.messages).to have_message(text: "user2reply")
expect(channel_page.message_thread_indicator(original_message)).to have_reply_count(2)