diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2019-03-11 18:19:34 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-05-15 15:41:00 +0100 |
commit | 0705acd66c58c09322f54875f33868414d8a8639 (patch) | |
tree | 7e467d54a609f73f5ac22715d08270f2fe636619 /spec | |
parent | b02fca968445e0828fc76bec689ab3d4f3755e07 (diff) | |
download | gitlab-ce-0705acd66c58c09322f54875f33868414d8a8639.tar.gz |
Fix flyout nav on small viewportsce-quick-fix-58727-collapsed-sidebar-flyout-menu-items-don-t-appear-in-1200px-screen-size
Decouples sidebar collapsed style from
behavior.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/fly_out_nav_spec.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/javascripts/fly_out_nav_spec.js b/spec/javascripts/fly_out_nav_spec.js index 7ef44f29c5b..4772f754937 100644 --- a/spec/javascripts/fly_out_nav_spec.js +++ b/spec/javascripts/fly_out_nav_spec.js @@ -14,6 +14,7 @@ import { setSidebar, subItemsMouseLeave, } from '~/fly_out_nav'; +import { SIDEBAR_COLLAPSED_CLASS } from '~/contextual_sidebar'; import bp from '~/breakpoints'; describe('Fly out sidebar navigation', () => { @@ -219,7 +220,7 @@ describe('Fly out sidebar navigation', () => { it('shows collapsed only sub-items if icon only sidebar', () => { const subItems = el.querySelector('.sidebar-sub-level-items'); const sidebar = document.createElement('div'); - sidebar.classList.add('sidebar-collapsed-desktop'); + sidebar.classList.add(SIDEBAR_COLLAPSED_CLASS); subItems.classList.add('is-fly-out-only'); setSidebar(sidebar); @@ -296,7 +297,7 @@ describe('Fly out sidebar navigation', () => { it('returns true when active & collapsed sidebar', () => { const sidebar = document.createElement('div'); - sidebar.classList.add('sidebar-collapsed-desktop'); + sidebar.classList.add(SIDEBAR_COLLAPSED_CLASS); el.classList.add('active'); setSidebar(sidebar); |