DEV: waits for mark_read! to be applied (#30444)

This commit is contained in:
Joffrey JAFFEUX 2024-12-23 13:54:13 +01:00 committed by GitHub
parent 96b5c28cf9
commit ae4a4b7d00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -137,12 +137,13 @@ RSpec.describe "List channels | Drawer", type: :system do
Fabricate(:chat_message, chat_channel: dm_channel_4, user: user_3, use_service: true)
dm_channel_4.membership_for(current_user).mark_read!(message.id)
expect(drawer_page).to have_channel_at_position(dm_channel_2, 1)
expect(drawer_page).to have_urgent_channel(dm_channel_2)
expect(drawer_page).to have_channel_at_position(dm_channel_4, 2)
expect(drawer_page).to have_channel_at_position(dm_channel_1, 3)
expect(drawer_page).to have_channel_at_position(dm_channel_3, 4)
try_until_success do
expect(drawer_page).to have_channel_at_position(dm_channel_2, 1)
expect(drawer_page).to have_urgent_channel(dm_channel_2)
expect(drawer_page).to have_channel_at_position(dm_channel_4, 2)
expect(drawer_page).to have_channel_at_position(dm_channel_1, 3)
expect(drawer_page).to have_channel_at_position(dm_channel_3, 4)
end
end
context "with unread threads" do