summaryrefslogtreecommitdiff
path: root/spec/features/contextual_sidebar_spec.rb
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2019-08-20 20:22:43 +0200
committerAchilleas Pipinellis <axil@gitlab.com>2019-08-20 20:22:43 +0200
commite61308ce1d82e12e5087371469baea4a452875d1 (patch)
tree62551a3ae4eab75e5af7e3b35358c07a51b2132f /spec/features/contextual_sidebar_spec.rb
parent4f323bb62fbe71a4352de25cab141f361a3fe1a6 (diff)
parent2989ed078c1d45b0959dcecb1bc3c8f4740a3c0d (diff)
downloadgitlab-ce-docs-patch-71.tar.gz
Merge branch 'master' into docs-patch-71docs-patch-71
Diffstat (limited to 'spec/features/contextual_sidebar_spec.rb')
-rw-r--r--spec/features/contextual_sidebar_spec.rb37
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..e250e8cc90a
--- /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('.rspec-link-pipelines').hover
+
+ expect(page).to have_selector('.is-showing-fly-out')
+
+ find('.rspec-project-link').hover
+
+ expect(page).not_to have_selector('.is-showing-fly-out')
+
+ find('.rspec-toggle-sidebar').click
+
+ find('.rspec-link-pipelines').hover
+
+ expect(page).to have_selector('.is-showing-fly-out')
+
+ find('.rspec-project-link').hover
+
+ expect(page).to have_selector('.is-showing-fly-out')
+ end
+end