summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-07 10:18:57 +0100
committerPhil Hughes <me@iamphill.com>2016-06-14 08:36:07 +0100
commita1be3241ec1f91182435a10615beac15fcfe235a (patch)
tree08e7b05320ac8a0e7fe9bc79fd390e4fb7d745bc
parent05525b5531f570e144341faad7428a6099a82710 (diff)
downloadgitlab-ce-a1be3241ec1f91182435a10615beac15fcfe235a.tar.gz
Todo tests and CHANGELOG
-rw-r--r--CHANGELOG1
-rw-r--r--spec/features/issues/todo_spec.rb33
2 files changed, 34 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3387394de5b..ae62b6b4c45 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -73,6 +73,7 @@ v 8.9.0 (unreleased)
- Put project Labels and Milestones pages links under Issues and Merge Requests tabs as subnav
- All classes in the Banzai::ReferenceParser namespace are now instrumented
- Remove deprecated issues_tracker and issues_tracker_id from project model
+ - Manually mark a issue or merge request as a todo
v 8.8.5 (unreleased)
- Ensure branch cleanup regardless of whether the GitHub import process succeeds
diff --git a/spec/features/issues/todo_spec.rb b/spec/features/issues/todo_spec.rb
new file mode 100644
index 00000000000..b69cce3e7d7
--- /dev/null
+++ b/spec/features/issues/todo_spec.rb
@@ -0,0 +1,33 @@
+require 'rails_helper'
+
+feature 'Manually create a todo item from issue', feature: true, js: true do
+ let!(:project) { create(:project) }
+ let!(:issue) { create(:issue, project: project) }
+ let!(:user) { create(:user)}
+
+ before do
+ project.team << [user, :master]
+ login_as(user)
+ visit namespace_project_issue_path(project.namespace, project, issue)
+ end
+
+ it 'should create todo when clicking button' do
+ page.within '.issuable-sidebar' do
+ click_button 'Add Todo'
+ expect(page).to have_content 'Mark Done'
+ end
+
+ page.within '.header-content .todos-pending-count' do
+ expect(page).to have_content '1'
+ end
+ end
+
+ it 'should mark a todo as done' do
+ page.within '.issuable-sidebar' do
+ click_button 'Add Todo'
+ click_button 'Mark Done'
+ end
+
+ expect(page).to have_selector('.todos-pending-count', visible: false)
+ end
+end