Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-09-19 15:43:04 +0300
committerPhil Hughes <me@iamphill.com>2017-09-22 14:12:15 +0300
commit9f3227645442017e3518e2b0ba3e9270ebabfa06 (patch)
treefc970a7b4b1e2fb309ed0a4ed19a7e46824f105e /spec/views
parentfa72d3461ad8df8c967d83c4faff14ab8c770d0b (diff)
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
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/dashboard/projects/_nav.html.haml.rb17
1 files changed, 17 insertions, 0 deletions
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