diff options
author | Fatih Acet <acetfatih@gmail.com> | 2019-03-06 00:35:30 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-03-06 00:35:30 +0000 |
commit | ab391b779ecf95b3a333dac0c247354c0ef92605 (patch) | |
tree | 79cc8a610711637f071140be1ee6cda4c82b8651 /spec/views | |
parent | eaa392d9ee9179b55675018c3e9eefbbc7312b54 (diff) | |
parent | ed29dd5293896aa3848d799420bb63991c55af49 (diff) | |
download | gitlab-ce-ab391b779ecf95b3a333dac0c247354c0ef92605.tar.gz |
Merge branch 'fix/38010-sidebar-loads-and-collapses' into 'master'
Updated ContextualSidebar to render collapsed on smaller screens
Closes #38010
See merge request gitlab-org/gitlab-ce!24555
Diffstat (limited to 'spec/views')
5 files changed, 37 insertions, 0 deletions
diff --git a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb index 05c2f61a606..bf63021a7fa 100644 --- a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb @@ -26,6 +26,8 @@ describe 'layouts/nav/sidebar/_admin' do it_behaves_like 'page has active tab', 'Overview' end + it_behaves_like 'has nav sidebar' + context 'on projects' do before do allow(controller).to receive(:controller_name).and_return('projects') diff --git a/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb new file mode 100644 index 00000000000..24b66a0e767 --- /dev/null +++ b/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'layouts/nav/sidebar/_group' do + let(:group) { create(:group) } + + before do + assign(:group, group) + end + + it_behaves_like 'has nav sidebar' +end diff --git a/spec/views/layouts/nav/sidebar/_instance_statistics.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_instance_statistics.html.haml_spec.rb new file mode 100644 index 00000000000..7f7f5637035 --- /dev/null +++ b/spec/views/layouts/nav/sidebar/_instance_statistics.html.haml_spec.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'layouts/nav/sidebar/_instance_statistics' do + it_behaves_like 'has nav sidebar' +end diff --git a/spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb new file mode 100644 index 00000000000..6b820ab0b4c --- /dev/null +++ b/spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'layouts/nav/sidebar/_profile' do + let(:user) { create(:user) } + + before do + allow(view).to receive(:current_user).and_return(user) + end + + it_behaves_like 'has nav sidebar' +end diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index d9f05e5f94f..2c60ccfb754 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -11,6 +11,8 @@ describe 'layouts/nav/sidebar/_project' do allow(view).to receive(:can?).and_return(true) end + it_behaves_like 'has nav sidebar' + describe 'issue boards' do it 'has board tab' do render |