DEV: Fix flaky spec when creating a chat message from params (#27099)
This commit is contained in:
parent
bc0ef9f7ee
commit
915982955b
|
@ -38,9 +38,9 @@ RSpec.describe "Chat New Message from params", type: :system do
|
||||||
it "creates a dm channel with multiple users" do
|
it "creates a dm channel with multiple users" do
|
||||||
chat_page.visit_new_message([user_1, user_2])
|
chat_page.visit_new_message([user_1, user_2])
|
||||||
|
|
||||||
expect(page).to have_current_path(
|
users = [user_1.username, user_2.username].permutation.map { |u| u.join("-") }.join("|")
|
||||||
"/chat/c/#{user_1.username}-#{user_2.username}/#{Chat::Channel.last.id}",
|
|
||||||
)
|
expect(page).to have_current_path(%r{/chat/c/(#{users})/#{Chat::Channel.last.id}})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue