diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-21 18:07:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-21 18:07:56 +0300 |
commit | 73edea02d353e8ed503922650a35f4a4e93fffdf (patch) | |
tree | 77b491d539ee14e6f49f25a41aa6c0f5acabaea5 | |
parent | ab72cfc3b323f2a34bd4426b9a42c13cd345b284 (diff) |
Add latest changes from gitlab-org/gitlab@master
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 6 | ||||
-rw-r--r-- | changelogs/unreleased/22571-inconsistent-real-time-checkbox.yml | 5 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | spec/features/task_lists_spec.rb | 69 | ||||
-rw-r--r-- | yarn.lock | 8 |
6 files changed, 83 insertions, 9 deletions
@@ -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' diff --git a/Gemfile.lock b/Gemfile.lock index 0086f7004f5..8b4657af4b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/changelogs/unreleased/22571-inconsistent-real-time-checkbox.yml b/changelogs/unreleased/22571-inconsistent-real-time-checkbox.yml new file mode 100644 index 00000000000..58e77e94eda --- /dev/null +++ b/changelogs/unreleased/22571-inconsistent-real-time-checkbox.yml @@ -0,0 +1,5 @@ +--- +title: Tasks in HTML comments are no longer incorrectly detected +merge_request: 21434 +author: +type: fixed diff --git a/package.json b/package.json index f15da3b985e..55c11aca9b0 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "d3-scale": "^1.0.7", "d3-selection": "^1.2.0", "dateformat": "^3.0.3", - "deckar01-task_list": "^2.2.1", + "deckar01-task_list": "^2.3.1", "diff": "^3.4.0", "document-register-element": "1.13.1", "dropzone": "^4.2.0", diff --git a/spec/features/task_lists_spec.rb b/spec/features/task_lists_spec.rb index 11429f16f42..bcd894a0d20 100644 --- a/spec/features/task_lists_spec.rb +++ b/spec/features/task_lists_spec.rb @@ -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 diff --git a/yarn.lock b/yarn.lock index 95dd0355851..580c971f7b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" |