DEV: rely on default session in smoke spec (#26054)
This commit is contained in:
parent
d1a2596889
commit
65c6909419
|
@ -20,11 +20,9 @@ RSpec.describe "Reply to message - smoke", type: :system do
|
|||
|
||||
context "when two users create a thread on the same message" do
|
||||
it "works" do
|
||||
using_session(:user_1) do
|
||||
sign_in(user_1)
|
||||
chat_page.visit_channel(channel_1)
|
||||
channel_page.reply_to(original_message)
|
||||
end
|
||||
sign_in(user_1)
|
||||
chat_page.visit_channel(channel_1)
|
||||
channel_page.reply_to(original_message)
|
||||
|
||||
using_session(:user_2) do
|
||||
sign_in(user_2)
|
||||
|
@ -33,12 +31,9 @@ RSpec.describe "Reply to message - smoke", type: :system do
|
|||
expect(side_panel).to have_open_thread(original_message.thread)
|
||||
end
|
||||
|
||||
using_session(:user_1) do
|
||||
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")
|
||||
end
|
||||
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")
|
||||
|
||||
using_session(:user_2) do |session|
|
||||
expect(thread_page.messages).to have_message(text: "user1reply")
|
||||
|
@ -53,11 +48,9 @@ RSpec.describe "Reply to message - smoke", type: :system do
|
|||
session.quit
|
||||
end
|
||||
|
||||
using_session(:user_1) do
|
||||
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(3)
|
||||
end
|
||||
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(3)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue