discourse/plugins/chat/spec/system/drawer/browse_spec.rb
Joffrey JAFFEUX c74fa300e7
FEATURE: allows browse page in chat drawer (#27919)
This commit ensures the browse page can be loaded in the drawer and doesn’t force full page mode.

Other notable changes of this commit:
- be consistent about wrapping each full page route with "c-routes.--route-name" and each drawer container with "c-drawer-routes.--route-name"
- move browse channels into its own component, it was before in the template of the channels browse
2024-07-16 12:34:37 +02:00

25 lines
564 B
Ruby

# frozen_string_literal: true
RSpec.describe "Drawer - Browse", type: :system do
fab!(:current_user) { Fabricate(:user) }
let(:drawer_page) { PageObjects::Pages::ChatDrawer.new }
fab!(:channel_1) { Fabricate(:chat_channel) }
before do
chat_system_bootstrap
sign_in(current_user)
end
it "can change status" do
drawer_page.visit_browse
expect(drawer_page.browse).to have_channel(name: channel_1.name)
drawer_page.browse.change_status("closed")
expect(drawer_page.browse).to have_no_channel(name: channel_1.name)
end
end