FIX: more reliable archive channel spec (#19605)

This commit is contained in:
Joffrey JAFFEUX 2022-12-23 10:25:51 +01:00 committed by GitHub
parent 29638f0639
commit 64dcd44c94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,9 +114,11 @@ RSpec.describe "Archive channel", type: :system, js: true do
it "can be retried" do
chat.visit_channel(channel_1)
click_button(I18n.t("js.chat.channel_archive.retry"))
visit(find(".chat-channel-archive-status a")["href"])
expect(page).to have_content(archive.destination_topic_title)
new_window = window_opened_by { find(".chat-channel-archive-status a").click }
within_window(new_window) do
expect(page).to have_content(archive.destination_topic_title)
end
end
end
end