Commit 2958a4b5 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch '22571-inconsistent-real-time-checkbox' into 'master'

Update `task_list` gem to version that supports `sourcepos`

See merge request gitlab-org/gitlab!21434
parents 1dcf1f84 caa44773
......@@ -137,7 +137,7 @@ gem 'faraday_middleware-aws-signers-v4'
# Markdown and HTML processing
gem 'html-pipeline', '~> 2.12'
gem 'deckar01-task_list', '2.2.1'
gem 'deckar01-task_list', '2.3.1'
gem 'gitlab-markup', '~> 1.7.0'
gem 'github-markup', '~> 1.7.0', require: 'github/markup'
gem 'commonmarker', '~> 0.20'
......
......@@ -192,7 +192,7 @@ GEM
database_cleaner (1.7.0)
debug_inspector (0.0.3)
debugger-ruby_core_source (1.3.8)
deckar01-task_list (2.2.1)
deckar01-task_list (2.3.1)
html-pipeline
declarative (0.0.10)
declarative-option (0.1.0)
......@@ -631,7 +631,7 @@ GEM
netrc (0.11.0)
nio4r (2.5.2)
no_proxy_fix (0.1.2)
nokogiri (1.10.5)
nokogiri (1.10.7)
mini_portile2 (~> 2.4.0)
nokogumbo (1.5.0)
nokogiri
......@@ -1160,7 +1160,7 @@ DEPENDENCIES
creole (~> 0.5.0)
danger (~> 6.0)
database_cleaner (~> 1.7.0)
deckar01-task_list (= 2.2.1)
deckar01-task_list (= 2.3.1)
default_value_for (~> 3.3.0)
derailed_benchmarks
device_detector
......
---
title: Tasks in HTML comments are no longer incorrectly detected
merge_request: 21434
author:
type: fixed
......@@ -51,6 +51,27 @@ describe 'Task Lists' do
EOT
end
let(:commented_tasks_markdown) do
<<-EOT.strip_heredoc
<!--
- [ ] a
-->
- [ ] b
EOT
end
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
before do
Warden.test_mode!
......@@ -291,4 +312,52 @@ describe 'Task Lists' do
end
end
end
describe 'markdown task edge cases' do
describe 'commented tasks', :js do
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
describe 'summary with no blank line', :js do
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
end
end
......@@ -3637,10 +3637,10 @@ decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0:
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
deckar01-task_list@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/deckar01-task_list/-/deckar01-task_list-2.2.1.tgz#e1e8a16c4fd6e153e51fd9258fdbee067ebcd86b"
integrity sha512-aNAVYAYwONXezSQy2p5M67wjZE+U7JpPotdegbyy1Wq35V6jDhF3qndJYA1rYnY3aI9ifCep6EMGPav/UQaBZw==
deckar01-task_list@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/deckar01-task_list/-/deckar01-task_list-2.3.1.tgz#f3ffd5319d7b9e27c596dc8d823b13f617ed7db7"
integrity sha512-046BmNx8e1Yia07SlSsyWb1h7wlGibcesRaw6Szw2qVppoe/EPtckFDRTY9P/laWiW3xjsfNLE1nOBOTAMKEWQ==
decode-uri-component@^0.2.0:
version "0.2.0"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment