Todo tests and CHANGELOG

This commit is contained in:
Phil Hughes 2016-06-07 10:18:57 +01:00
parent 05525b5531
commit a1be3241ec
2 changed files with 34 additions and 0 deletions

View File

@ -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

View File

@ -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