diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-12 17:38:09 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-25 06:46:11 +0200 |
commit | 7629dc9982f5559972acf9d9b9d98f78ad53e54c (patch) | |
tree | abbdeccb7afb5b0a86c7e199253c3eceb63bd1a8 /spec/features | |
parent | 6fb46b604e4feebcbaa92d3d44d7616be709c0e5 (diff) | |
download | gitlab-ce-19730-mark-as-done.tar.gz |
Add specs to ensure a successful return 19730-mark-as-done
on the UI when mark as done a already done todo.
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/todos/todos_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/todos/todos_spec.rb b/spec/features/todos/todos_spec.rb index 0342f4f1d97..32544f3f538 100644 --- a/spec/features/todos/todos_spec.rb +++ b/spec/features/todos/todos_spec.rb @@ -41,6 +41,27 @@ describe 'Dashboard Todos', feature: true do expect(page).to have_content("You're all done!") end end + + context 'todo is stale on the page' do + before do + todos = TodosFinder.new(user, state: :pending).execute + TodoService.new.mark_todos_as_done(todos, user) + end + + describe 'deleting the todo' do + before do + first('.done-todo').click + end + + it 'is removed from the list' do + expect(page).not_to have_selector('.todos-list .todo') + end + + it 'shows "All done" message' do + expect(page).to have_content("You're all done!") + end + end + end end context 'User has Todos with labels spanning multiple projects' do |