diff options
author | Phil Hughes <me@iamphill.com> | 2019-06-14 07:47:07 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-06-14 07:47:07 +0000 |
commit | cd300323c8cc6744c46ef3f732c412226615abbf (patch) | |
tree | 31893bcf0206bec37a0cb817836fca9b138df703 /spec | |
parent | 96a46468c23d7017db00f78e200fddfee832eb39 (diff) | |
parent | 32c5fa99fef70caeed33a852f0bb0c8b9a41028e (diff) | |
download | gitlab-ce-cd300323c8cc6744c46ef3f732c412226615abbf.tar.gz |
Merge branch 'fix-flyout-navs' into 'master'
Fix sidebar flyout navigation
See merge request gitlab-org/gitlab-ce!29571
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/contextual_sidebar_spec.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/features/contextual_sidebar_spec.rb b/spec/features/contextual_sidebar_spec.rb new file mode 100644 index 00000000000..88da1b7966b --- /dev/null +++ b/spec/features/contextual_sidebar_spec.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'Contextual sidebar', :js do + let(:user) { create(:user) } + let(:project) { create(:project) } + + before do + project.add_maintainer(user) + sign_in(user) + + visit project_path(project) + end + + it 'shows flyout navs when collapsed or expanded apart from on the active item when expanded' do + expect(page).not_to have_selector('.js-sidebar-collapsed') + + find('.qa-link-pipelines').hover + + expect(page).to have_selector('.is-showing-fly-out') + + find('.qa-link-project').hover + + expect(page).not_to have_selector('.is-showing-fly-out') + + find('.qa-toggle-sidebar').click + + find('.qa-link-pipelines').hover + + expect(page).to have_selector('.is-showing-fly-out') + + find('.qa-link-project').hover + + expect(page).to have_selector('.is-showing-fly-out') + end +end |