From 9f3227645442017e3518e2b0ba3e9270ebabfa06 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 19 Sep 2017 13:43:04 +0100 Subject: Add context tabs to dashboard/projects This allows users to quickly switch between all projects they have access to & there own namespace projects. These tabs also keep the same filtering/search options selected so the user can quickly switch between the two different contexts. Closes #29045 --- spec/views/dashboard/projects/_nav.html.haml.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/views/dashboard/projects/_nav.html.haml.rb (limited to 'spec/views') diff --git a/spec/views/dashboard/projects/_nav.html.haml.rb b/spec/views/dashboard/projects/_nav.html.haml.rb new file mode 100644 index 00000000000..f6a8ca13040 --- /dev/null +++ b/spec/views/dashboard/projects/_nav.html.haml.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe 'dashboard/projects/_nav.html.haml' do + it 'highlights All tab by default' do + render + + expect(rendered).to have_css('li.active a', text: 'All') + end + + it 'highlights Personal tab personal param is present' do + controller.params[:personal] = true + + render + + expect(rendered).to have_css('li.active a', text: 'Personal') + end +end -- cgit v1.2.3