mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 22:33:54 +08:00
5db72f8daf
This allows users to preview the sidebar even when `SiteSetting.naviation_menu` is set to `false`.
23 lines
707 B
Ruby
23 lines
707 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe "Viewing sidebar", type: :system, js: true do
|
|
fab!(:admin) { Fabricate(:admin) }
|
|
fab!(:user) { Fabricate(:user) }
|
|
fab!(:category_sidebar_section_link) { Fabricate(:category_sidebar_section_link, user: user) }
|
|
|
|
describe "when using the legacy navigation menu" do
|
|
before { SiteSetting.navigation_menu = "legacy" }
|
|
|
|
it "should display the sidebar when `enable_sidebar` query param is '1'" do
|
|
sign_in(user)
|
|
|
|
visit("/latest?enable_sidebar=1")
|
|
|
|
sidebar = PageObjects::Components::Sidebar.new
|
|
|
|
expect(sidebar).to be_visible
|
|
expect(sidebar).to have_category_section_link(category_sidebar_section_link.linkable)
|
|
end
|
|
end
|
|
end
|