gitlab-org--gitlab-foss/spec/support/shared_examples/views/nav_sidebar.rb
Ezekiel Kigbo 9ef058bee2
Updated nav-sidebar to collapse on load
Adds the collapsed mixin to the styling for .nav-sidebar
ensuring the nav-sidebar is collapsed on load via media
queries. Removes the need for an intermediate class to
collapse the sidebar on mobile viewports

Updated toggleCollapsedSidebar to check for desktop breakpoint
2019-03-05 00:58:22 +11:00

11 lines
332 B
Ruby

# frozen_string_literal: true
shared_examples 'has nav sidebar' do
it 'has collapsed nav sidebar on mobile' do
render
expect(rendered).to have_selector('.nav-sidebar')
expect(rendered).not_to have_selector('.sidebar-collapsed-desktop')
expect(rendered).not_to have_selector('.sidebar-expanded-mobile')
end
end