summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-04-07 12:35:25 -0300
committerYorick Peterse <yorickpeterse@gmail.com>2016-04-08 12:04:12 +0200
commit70ba0294b343e0763d3d756858b26d65ce7af7ca (patch)
tree8efe91862a561a566361860735828bf734ecaf19
parentf47e511b53450e4ca25fed775dbf10a369e78c70 (diff)
downloadgitlab-ce-70ba0294b343e0763d3d756858b26d65ce7af7ca.tar.gz
Update number of Todos in the sidebar when it's marked as "Done"
-rw-r--r--app/views/layouts/nav/_dashboard.html.haml2
-rw-r--r--features/steps/dashboard/todos.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml
index d1a180e4299..f1052eadf81 100644
--- a/app/views/layouts/nav/_dashboard.html.haml
+++ b/app/views/layouts/nav/_dashboard.html.haml
@@ -9,7 +9,7 @@
= icon('bell fw')
%span
Todos
- %span.count= number_with_delimiter(todos_pending_count)
+ %span.count.todos-pending-count= number_with_delimiter(todos_pending_count)
= nav_link(path: 'dashboard#activity') do
= link_to activity_dashboard_path, class: 'shortcuts-activity', title: 'Activity' do
= icon('dashboard fw')
diff --git a/features/steps/dashboard/todos.rb b/features/steps/dashboard/todos.rb
index 30b21b93ac7..a6e574f12a9 100644
--- a/features/steps/dashboard/todos.rb
+++ b/features/steps/dashboard/todos.rb
@@ -26,6 +26,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
end
step 'I should see todos assigned to me' do
+ page.within('.nav-sidebar') { expect(page).to have_content 'Todos 4' }
expect(page).to have_content 'To do 4'
expect(page).to have_content 'Done 0'
@@ -41,6 +42,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
click_link 'Done'
end
+ page.within('.nav-sidebar') { expect(page).to have_content 'Todos 3' }
expect(page).to have_content 'To do 3'
expect(page).to have_content 'Done 1'
should_not_see_todo "John Doe assigned you merge request !#{merge_request.iid}"