DEV: Speed up chat plugin system tests (#21399)

See e323628d8a363ea29d1f341b95ffcdf8f3c09fca for more details.

This commit speeds up the tests by roughly 10 seconds locally where the
default wait time is 2 seconds. On CI, this speeds up the tests by 20
seconds where the default wait time is 4 seconds.
This commit is contained in:
Alan Guo Xiang Tan
2023-05-05 08:16:23 +08:00
committed by GitHub
parent e323628d8a
commit 7ff8e5580f
5 changed files with 26 additions and 9 deletions

View File

@ -10,11 +10,12 @@ RSpec.describe "Create channel", type: :system, js: true do
context "when user cannot create channel" do
fab!(:current_user) { Fabricate(:user) }
before { sign_in(current_user) }
it "does not show the create channel button" do
chat_page.visit_browse
expect(chat_page).not_to have_new_channel_button
expect(chat_page).to have_no_new_channel_button
end
end