2019-07-25 01:24:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-05-04 23:06:57 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
RSpec.describe 'Task Lists', :js do
|
2015-05-04 23:06:57 -04:00
|
|
|
include Warden::Test::Helpers
|
|
|
|
|
2020-09-01 08:11:01 -04:00
|
|
|
let_it_be(:project) { create(:project, :public, :repository) }
|
|
|
|
let_it_be(:user) { create(:user) }
|
|
|
|
let_it_be(:user2) { create(:user) }
|
2015-05-04 23:06:57 -04:00
|
|
|
|
|
|
|
let(:markdown) do
|
|
|
|
<<-MARKDOWN.strip_heredoc
|
|
|
|
This is a task list:
|
|
|
|
|
|
|
|
- [ ] Incomplete entry 1
|
|
|
|
- [x] Complete entry 1
|
|
|
|
- [ ] Incomplete entry 2
|
|
|
|
- [x] Complete entry 2
|
|
|
|
- [ ] Incomplete entry 3
|
|
|
|
- [ ] Incomplete entry 4
|
|
|
|
MARKDOWN
|
|
|
|
end
|
|
|
|
|
2022-04-06 14:08:19 -04:00
|
|
|
let(:single_incomplete_markdown) do
|
2016-08-27 13:36:08 -04:00
|
|
|
<<-MARKDOWN.strip_heredoc
|
|
|
|
This is a task list:
|
|
|
|
|
|
|
|
- [ ] Incomplete entry 1
|
|
|
|
MARKDOWN
|
|
|
|
end
|
|
|
|
|
2022-04-06 14:08:19 -04:00
|
|
|
let(:single_complete_markdown) do
|
2016-08-27 13:36:08 -04:00
|
|
|
<<-MARKDOWN.strip_heredoc
|
|
|
|
This is a task list:
|
|
|
|
|
|
|
|
- [x] Incomplete entry 1
|
|
|
|
MARKDOWN
|
|
|
|
end
|
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
before_all do
|
2018-07-11 10:36:08 -04:00
|
|
|
project.add_maintainer(user)
|
2017-08-09 07:30:07 -04:00
|
|
|
project.add_guest(user2)
|
2020-09-01 08:11:01 -04:00
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2020-09-01 08:11:01 -04:00
|
|
|
before do
|
2015-05-04 23:06:57 -04:00
|
|
|
login_as(user)
|
|
|
|
end
|
|
|
|
|
|
|
|
def visit_issue(project, issue)
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_issue_path(project, issue)
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|
|
|
|
|
2017-06-29 00:13:10 -04:00
|
|
|
describe 'for Issues' do
|
2020-09-25 08:10:00 -04:00
|
|
|
describe 'multiple tasks' do
|
2016-08-27 13:36:08 -04:00
|
|
|
let!(:issue) { create(:issue, description: markdown, author: user, project: project) }
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
it 'renders' do
|
|
|
|
visit_issue(project, issue)
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2017-04-24 17:03:58 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 6)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 2)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'contains the required selectors' do
|
|
|
|
visit_issue(project, issue)
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2016-08-27 13:36:08 -04:00
|
|
|
|
2019-03-23 09:09:14 -04:00
|
|
|
expect(page).to have_selector(".md .task-list .task-list-item .task-list-item-checkbox")
|
2021-02-24 04:11:09 -05:00
|
|
|
expect(page).to have_selector('.btn-close')
|
2016-08-27 13:36:08 -04:00
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
it 'is only editable by author' do
|
|
|
|
visit_issue(project, issue)
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2017-04-24 17:03:58 -04:00
|
|
|
|
2019-03-23 09:09:14 -04:00
|
|
|
expect(page).to have_selector(".md .task-list .task-list-item .task-list-item-checkbox")
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
logout(:user)
|
|
|
|
login_as(user2)
|
|
|
|
visit current_path
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2017-05-03 16:35:54 -04:00
|
|
|
|
2019-03-23 09:09:14 -04:00
|
|
|
expect(page).to have_selector(".md .task-list .task-list-item .task-list-item-checkbox")
|
2016-08-27 13:36:08 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'provides a summary on Issues#index' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_issues_path(project)
|
2020-01-31 13:09:11 -05:00
|
|
|
|
2022-08-10 02:10:51 -04:00
|
|
|
expect(page).to have_content("2 of 6 checklist items completed")
|
2016-08-27 13:36:08 -04:00
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
describe 'single incomplete task' do
|
2022-04-06 14:08:19 -04:00
|
|
|
let!(:issue) { create(:issue, description: single_incomplete_markdown, author: user, project: project) }
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
it 'renders' do
|
|
|
|
visit_issue(project, issue)
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2017-04-24 17:03:58 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 0)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'provides a summary on Issues#index' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_issues_path(project)
|
2017-05-03 16:35:54 -04:00
|
|
|
|
2022-08-10 02:10:51 -04:00
|
|
|
expect(page).to have_content("0 of 1 checklist item completed")
|
2016-08-27 13:36:08 -04:00
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
describe 'single complete task' do
|
2022-04-06 14:08:19 -04:00
|
|
|
let!(:issue) { create(:issue, description: single_complete_markdown, author: user, project: project) }
|
2016-08-27 13:36:08 -04:00
|
|
|
|
|
|
|
it 'renders' do
|
|
|
|
visit_issue(project, issue)
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2017-04-24 17:03:58 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 1)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'provides a summary on Issues#index' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_issues_path(project)
|
2017-05-03 16:35:54 -04:00
|
|
|
|
2022-08-10 02:10:51 -04:00
|
|
|
expect(page).to have_content("1 of 1 checklist item completed")
|
2016-08-27 13:36:08 -04:00
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'for Notes' do
|
|
|
|
let!(:issue) { create(:issue, author: user, project: project) }
|
2019-12-17 13:07:48 -05:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
describe 'multiple tasks' do
|
|
|
|
let!(:note) do
|
|
|
|
create(:note, note: markdown, noteable: issue,
|
|
|
|
project: project, author: user)
|
|
|
|
end
|
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'renders for note body' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_issue(project, issue)
|
|
|
|
|
|
|
|
expect(page).to have_selector('.note ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('.note li.task-list-item', count: 6)
|
|
|
|
expect(page).to have_selector('.note ul input[checked]', count: 2)
|
|
|
|
end
|
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'contains the required selectors' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_issue(project, issue)
|
|
|
|
|
|
|
|
expect(page).to have_selector('.note .js-task-list-container')
|
|
|
|
expect(page).to have_selector('.note .js-task-list-container .task-list .task-list-item .task-list-item-checkbox')
|
|
|
|
end
|
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'is only editable by author' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_issue(project, issue)
|
2020-01-31 13:09:11 -05:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector('.js-task-list-container')
|
|
|
|
|
2017-09-04 01:47:56 -04:00
|
|
|
gitlab_sign_out
|
2016-08-27 13:36:08 -04:00
|
|
|
|
2017-09-04 01:47:56 -04:00
|
|
|
gitlab_sign_in(user2)
|
2016-08-27 13:36:08 -04:00
|
|
|
visit current_path
|
|
|
|
expect(page).not_to have_selector('.js-task-list-container')
|
|
|
|
end
|
2016-04-26 07:52:18 -04:00
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
describe 'single incomplete task' do
|
|
|
|
let!(:note) do
|
2022-04-06 14:08:19 -04:00
|
|
|
create(:note, note: single_incomplete_markdown, noteable: issue,
|
2016-08-27 13:36:08 -04:00
|
|
|
project: project, author: user)
|
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'renders for note body' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_issue(project, issue)
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector('.note ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('.note li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('.note ul input[checked]', count: 0)
|
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
describe 'single complete task' do
|
|
|
|
let!(:note) do
|
2022-04-06 14:08:19 -04:00
|
|
|
create(:note, note: single_complete_markdown, noteable: issue,
|
2016-08-27 13:36:08 -04:00
|
|
|
project: project, author: user)
|
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'renders for note body' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_issue(project, issue)
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector('.note ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('.note li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('.note ul input[checked]', count: 1)
|
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'for Merge Requests' do
|
|
|
|
def visit_merge_request(project, merge)
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_request_path(project, merge)
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|
|
|
|
|
2020-01-31 13:09:11 -05:00
|
|
|
shared_examples 'multiple tasks' do
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'renders for description' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_merge_request(project, merge)
|
2020-02-03 19:09:04 -05:00
|
|
|
wait_for_requests
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 6)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 2)
|
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'contains the required selectors' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_merge_request(project, merge)
|
2020-02-03 19:09:04 -05:00
|
|
|
wait_for_requests
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
container = '.detail-page-description .description.js-task-list-container'
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector(container)
|
2019-03-23 09:09:14 -04:00
|
|
|
expect(page).to have_selector("#{container} .md .task-list .task-list-item .task-list-item-checkbox")
|
2020-02-03 19:09:04 -05:00
|
|
|
expect(page).to have_selector("#{container} .js-task-list-field", visible: false)
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector('form.js-issuable-update')
|
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'is only editable by author' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_merge_request(project, merge)
|
2020-02-03 19:09:04 -05:00
|
|
|
wait_for_requests
|
2020-01-31 13:09:11 -05:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).to have_selector('.js-task-list-container')
|
2020-01-31 13:09:11 -05:00
|
|
|
expect(page).to have_selector('li.task-list-item.enabled', count: 6)
|
2015-05-04 23:06:57 -04:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
logout(:user)
|
|
|
|
login_as(user2)
|
|
|
|
visit current_path
|
2020-02-03 19:09:04 -05:00
|
|
|
wait_for_requests
|
2020-01-31 13:09:11 -05:00
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
expect(page).not_to have_selector('.js-task-list-container')
|
2020-01-31 13:09:11 -05:00
|
|
|
expect(page).to have_selector('li.task-list-item.enabled', count: 0)
|
|
|
|
expect(page).to have_selector('li.task-list-item input[disabled]', count: 6)
|
2016-08-27 13:36:08 -04:00
|
|
|
end
|
2020-01-31 13:09:11 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'when merge request is open' do
|
|
|
|
let!(:merge) { create(:merge_request, :simple, description: markdown, author: user, source_project: project) }
|
|
|
|
|
|
|
|
it_behaves_like 'multiple tasks'
|
2016-08-27 13:36:08 -04:00
|
|
|
|
|
|
|
it 'provides a summary on MergeRequests#index' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_requests_path(project)
|
2020-01-31 13:09:11 -05:00
|
|
|
|
2022-08-10 02:10:51 -04:00
|
|
|
expect(page).to have_content("2 of 6 checklist items completed")
|
2016-08-27 13:36:08 -04:00
|
|
|
end
|
|
|
|
end
|
2017-01-18 08:33:13 -05:00
|
|
|
|
2020-01-31 13:09:11 -05:00
|
|
|
context 'when merge request is closed' do
|
|
|
|
let!(:merge) { create(:merge_request, :closed, :simple, description: markdown, author: user, source_project: project) }
|
|
|
|
|
|
|
|
it_behaves_like 'multiple tasks'
|
|
|
|
end
|
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
describe 'single incomplete task' do
|
2022-04-06 14:08:19 -04:00
|
|
|
let!(:merge) { create(:merge_request, :simple, description: single_incomplete_markdown, author: user, source_project: project) }
|
2016-08-27 13:36:08 -04:00
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'renders for description' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_merge_request(project, merge)
|
2020-02-03 19:09:04 -05:00
|
|
|
wait_for_requests
|
2016-08-27 13:36:08 -04:00
|
|
|
|
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 0)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'provides a summary on MergeRequests#index' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_requests_path(project)
|
2020-01-31 13:09:11 -05:00
|
|
|
|
2022-08-10 02:10:51 -04:00
|
|
|
expect(page).to have_content("0 of 1 checklist item completed")
|
2016-08-27 13:36:08 -04:00
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|
|
|
|
|
2016-08-27 13:36:08 -04:00
|
|
|
describe 'single complete task' do
|
2022-04-06 14:08:19 -04:00
|
|
|
let!(:merge) { create(:merge_request, :simple, description: single_complete_markdown, author: user, source_project: project) }
|
2016-08-27 13:36:08 -04:00
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
it 'renders for description' do
|
2016-08-27 13:36:08 -04:00
|
|
|
visit_merge_request(project, merge)
|
2020-02-03 19:09:04 -05:00
|
|
|
wait_for_requests
|
2016-08-27 13:36:08 -04:00
|
|
|
|
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 1)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'provides a summary on MergeRequests#index' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_requests_path(project)
|
2020-02-03 19:09:04 -05:00
|
|
|
|
2022-08-10 02:10:51 -04:00
|
|
|
expect(page).to have_content("1 of 1 checklist item completed")
|
2016-08-27 13:36:08 -04:00
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|
|
|
|
end
|
2019-12-21 10:07:56 -05:00
|
|
|
|
|
|
|
describe 'markdown task edge cases' do
|
2020-09-25 08:10:00 -04:00
|
|
|
describe 'commented tasks' do
|
|
|
|
let(:commented_tasks_markdown) do
|
|
|
|
<<-EOT.strip_heredoc
|
|
|
|
<!--
|
|
|
|
- [ ] a
|
|
|
|
-->
|
|
|
|
|
|
|
|
- [ ] b
|
|
|
|
EOT
|
|
|
|
end
|
|
|
|
|
2019-12-21 10:07:56 -05:00
|
|
|
let!(:issue) { create(:issue, description: commented_tasks_markdown, author: user, project: project) }
|
|
|
|
|
|
|
|
it 'renders' do
|
|
|
|
visit_issue(project, issue)
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 0)
|
|
|
|
|
|
|
|
find('.task-list-item-checkbox').click
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
visit_issue(project, issue)
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-09-25 08:10:00 -04:00
|
|
|
describe 'summary with no blank line' do
|
|
|
|
let(:summary_no_blank_line_markdown) do
|
|
|
|
<<-EOT.strip_heredoc
|
|
|
|
<details>
|
|
|
|
<summary>No blank line after summary element breaks task list</summary>
|
|
|
|
1. [ ] People Ops: do such and such
|
|
|
|
</details>
|
|
|
|
|
|
|
|
* [ ] Task 1
|
|
|
|
EOT
|
|
|
|
end
|
|
|
|
|
2019-12-21 10:07:56 -05:00
|
|
|
let!(:issue) { create(:issue, description: summary_no_blank_line_markdown, author: user, project: project) }
|
|
|
|
|
|
|
|
it 'renders' do
|
|
|
|
visit_issue(project, issue)
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 0)
|
|
|
|
|
|
|
|
find('.task-list-item-checkbox').click
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
visit_issue(project, issue)
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
expect(page).to have_selector('ul.task-list', count: 1)
|
|
|
|
expect(page).to have_selector('li.task-list-item', count: 1)
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 1)
|
|
|
|
end
|
|
|
|
end
|
2020-09-25 08:10:00 -04:00
|
|
|
|
|
|
|
describe 'markdown starting with new line character' do
|
|
|
|
let(:markdown_starting_with_new_line) do
|
|
|
|
<<-EOT.strip_heredoc
|
|
|
|
|
|
|
|
- [ ] Task 1
|
|
|
|
EOT
|
|
|
|
end
|
|
|
|
|
|
|
|
let(:merge_request) { create(:merge_request, description: markdown_starting_with_new_line, author: user, source_project: project) }
|
|
|
|
|
|
|
|
it 'allows the task to be checked' do
|
|
|
|
visit project_merge_request_path(project, merge_request)
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 0)
|
|
|
|
|
|
|
|
find('.task-list-item-checkbox').click
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
visit project_merge_request_path(project, merge_request)
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
expect(page).to have_selector('ul input[checked]', count: 1)
|
|
|
|
end
|
|
|
|
end
|
2019-12-21 10:07:56 -05:00
|
|
|
end
|
2015-05-04 23:06:57 -04:00
|
|
|
end
|