mediawiki-extensions-Discus.../tests/cases/formattedreply.json
Bartosz Dziewoński 6e37a172ae Fix detecting decorative comment frames with whitespace
As a result of 0fc71f60cd, "empty" text
nodes (containing only whitespace) at the end of the comment may be
inside the comment's range, and trying to ignore them caused the
ranges not to match and the frame not to be detected.

Now the code works whether they're inside the comment's range or not.

Add a test case for wrapped discussion comments with HTML comments and
with whitespace.

Bug: T250126
Bug: T268407
Change-Id: I2217ff5a635fd1c9c9e803f46795b1bfb3d17535
2021-01-04 20:31:33 +01:00

52 lines
1.8 KiB
JSON

[
{
"name": "plwiki oldparser",
"dom": "cases/pl-big-oldparser/pl-big-oldparser.html",
"expected": "cases/pl-big-oldparser/pl-big-oldparser-formattedreply.html",
"config": "../data/plwiki-config.json",
"data": "../data/plwiki-data.json"
},
{
"name": "enwiki oldparser",
"dom": "cases/en-big-oldparser/en-big-oldparser.html",
"expected": "cases/en-big-oldparser/en-big-oldparser-formattedreply.html",
"config": "../data/enwiki-config.json",
"data": "../data/enwiki-data.json"
},
{
"name": "arwiki no-paragraph oldparser",
"dom": "cases/ar-no-paragraph-oldparser/ar-no-paragraph-oldparser.html",
"expected": "cases/ar-no-paragraph-oldparser/ar-no-paragraph-oldparser-formattedreply.html",
"config": "../data/arwiki-config.json",
"data": "../data/arwiki-data.json"
},
{
"name": "frwiki unsigned oldparser",
"dom": "cases/fr-unsigned-oldparser/fr-unsigned-oldparser.html",
"expected": "cases/fr-unsigned-oldparser/fr-unsigned-oldparser-formattedreply.html",
"config": "../data/frwiki-config.json",
"data": "../data/frwiki-data.json"
},
{
"name": "itwiki unsigned oldparser",
"dom": "cases/it-unsigned-oldparser/it-unsigned-oldparser.html",
"expected": "cases/it-unsigned-oldparser/it-unsigned-oldparser-formattedreply.html",
"config": "../data/itwiki-config.json",
"data": "../data/itwiki-data.json"
},
{
"name": "Reply inserted inside/outside various wrapper elements",
"dom": "cases/wrappers/wrappers.html",
"expected": "cases/wrappers/wrappers-formattedreply.html",
"config": "../data/enwiki-config.json",
"data": "../data/enwiki-data.json"
},
{
"name": "Signatures in funny places",
"dom": "cases/signatures-funny/signatures-funny.html",
"expected": "cases/signatures-funny/signatures-funny-formattedreply.html",
"config": "../data/enwiki-config.json",
"data": "../data/enwiki-data.json"
}
]