summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2016-04-07 17:44:41 +0000
committerJacob Schatz <jschatz1@gmail.com>2016-04-07 17:44:41 +0000
commitf79d3cda351719785b34e4557b2d88736bc191ef (patch)
tree0efceae4fcc6d9bde7a405f570ab5aed04af5741
parent074c2393901de2f06d9c4317f2ada6600b13d2e8 (diff)
parentee62ce65a1b80f3dae9c2cb5a52b784895fb8a9e (diff)
downloadgitlab-ce-f79d3cda351719785b34e4557b2d88736bc191ef.tar.gz
Merge branch 'fix-number-of-todos-sidebar-is-not-updated' into 'master'
Update number of Todos in the sidebar when it's marked as "Done" Closes #15002 See merge request !3600
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/layouts/nav/_dashboard.html.haml2
-rw-r--r--features/steps/dashboard/todos.rb2
3 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 12df0492020..151875249d8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -31,6 +31,7 @@ v 8.7.0 (unreleased)
- Build status notifications
- API: Expose user location (Robert Schilling)
- ClosingIssueExtractor regex now also works with colons. e.g. "Fixes: #1234" !3591
+ - Update number of Todos in the sidebar when it's marked as "Done". !3600
v 8.6.5 (unreleased)
- Only update repository language if it is not set to improve performance
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}"