Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
caa44773
Commit
caa44773
authored
Dec 13, 2019
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs that test some markdown task edge cases
and changelog
parent
2781937d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
0 deletions
+74
-0
changelogs/unreleased/22571-inconsistent-real-time-checkbox.yml
...logs/unreleased/22571-inconsistent-real-time-checkbox.yml
+5
-0
spec/features/task_lists_spec.rb
spec/features/task_lists_spec.rb
+69
-0
No files found.
changelogs/unreleased/22571-inconsistent-real-time-checkbox.yml
0 → 100644
View file @
caa44773
---
title
:
Tasks in HTML comments are no longer incorrectly detected
merge_request
:
21434
author
:
type
:
fixed
spec/features/task_lists_spec.rb
View file @
caa44773
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment