mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 09:43:30 +00:00
Add test cases for the main loop getting stuck on some signatures
Follow-up to 9db35873a4
.
Bug: T356884
Change-Id: Ifef490209fdee2b9f52d3ef81a92ea20c5ff2155
This commit is contained in:
parent
ddba94eb88
commit
f4090865d4
|
@ -231,6 +231,22 @@
|
|||
"config": "../data/enwiki-config.json",
|
||||
"data": "../data/enwiki-data.json"
|
||||
},
|
||||
{
|
||||
"name": "Signature with multiple timestamp in formatting elements causing an infinite loop (T356884)",
|
||||
"title": "Talk:T356884",
|
||||
"dom": "cases/signatures-T356884/signatures-T356884.html",
|
||||
"expected": "../cases/signatures-T356884/signatures-T356884.json",
|
||||
"config": "../data/enwiki-config.json",
|
||||
"data": "../data/enwiki-data.json"
|
||||
},
|
||||
{
|
||||
"name": "Signature with unclosed formatting elements doesn't eat subsequent comments",
|
||||
"title": "Talk:T356884b",
|
||||
"dom": "cases/signatures-T356884b/signatures-T356884b.html",
|
||||
"expected": "../cases/signatures-T356884b/signatures-T356884b.json",
|
||||
"config": "../data/enwiki-config.json",
|
||||
"data": "../data/enwiki-data.json"
|
||||
},
|
||||
{
|
||||
"name": "Timestamp format switch behavior",
|
||||
"title": "Talk:T304595",
|
||||
|
|
3
tests/cases/signatures-T356884/signatures-T356884.html
Normal file
3
tests/cases/signatures-T356884/signatures-T356884.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<!DOCTYPE html>
|
||||
<html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/" about="http://localhost:3080/wiki/Special:Redirect/revision/6957"><head prefix="mwr: http://localhost:3080/wiki/Special:Redirect/"><meta charset="utf-8"/><meta property="mw:pageId" content="100097"/><meta property="mw:pageNamespace" content="1"/><link rel="dc:replaces" resource="mwr:revision/6956"/><meta property="mw:revisionSHA1" content="97401198621c8679ae70352b200747b62f752132"/><meta property="dc:modified" content="2024-02-07T18:23:57.000Z"/><meta property="mw:htmlVersion" content="2.8.0"/><meta property="mw:html:version" content="2.8.0"/><link rel="dc:isVersionOf" href="http://localhost:3080/wiki/Talk%3AT356884"/><base href="http://localhost:3080/wiki/"/><title>Talk:T356884</title><link rel="stylesheet" href="/w/load.php?lang=en&modules=mediawiki.skinning.content.parsoid%7Cmediawiki.skinning.interface%7Csite.styles&only=styles&skin=vector"/><meta http-equiv="content-language" content="en"/><meta http-equiv="vary" content="Accept"/></head><body id="mwAA" lang="en" class="mw-content-ltr sitedir-ltr ltr mw-body-content parsoid-body mediawiki mw-parser-output" dir="ltr"><section data-mw-section-id="0" id="mwAQ"></section><section data-mw-section-id="1" id="mwAg"><h2 id="test">test</h2>
|
||||
<p id="mwAw">hi <a rel="mw:WikiLink" href="./User:Matma_Rex" title="User:Matma Rex" id="mwBA">Matma Rex</a> <small id="mwBQ">01:01, 7 February 2024 (UTC)<br id="mwBg"/>01:02, 7 February 2024 (UTC)</small></p></section></body></html>
|
43
tests/cases/signatures-T356884/signatures-T356884.json
Normal file
43
tests/cases/signatures-T356884/signatures-T356884.json
Normal file
|
@ -0,0 +1,43 @@
|
|||
[
|
||||
{
|
||||
"placeholderHeading": false,
|
||||
"type": "heading",
|
||||
"range": [
|
||||
"1/0/0",
|
||||
"1/0/1"
|
||||
],
|
||||
"headingLevel": 2,
|
||||
"level": 0,
|
||||
"name": "h-Matma_Rex-20240207010100",
|
||||
"id": "h-test-20240207010100",
|
||||
"warnings": [],
|
||||
"replies": [
|
||||
{
|
||||
"type": "comment",
|
||||
"timestamp": "20240207010100",
|
||||
"author": "Matma Rex",
|
||||
"range": [
|
||||
"1/2/0",
|
||||
"1/2/3/0/28"
|
||||
],
|
||||
"signatureRanges": [
|
||||
[
|
||||
"1/2/1",
|
||||
"1/2/4"
|
||||
]
|
||||
],
|
||||
"timestampRanges": [
|
||||
[
|
||||
"1/2/3/0/0",
|
||||
"1/2/3/0/28"
|
||||
]
|
||||
],
|
||||
"level": 1,
|
||||
"name": "c-Matma_Rex-20240207010100",
|
||||
"id": "c-Matma_Rex-20240207010100-test",
|
||||
"warnings": [],
|
||||
"replies": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
5
tests/cases/signatures-T356884b/signatures-T356884b.html
Normal file
5
tests/cases/signatures-T356884b/signatures-T356884b.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/" about="http://localhost:3080/wiki/Special:Redirect/revision/6959"><head prefix="mwr: http://localhost:3080/wiki/Special:Redirect/"><meta charset="utf-8"/><meta property="mw:pageId" content="100099"/><meta property="mw:pageNamespace" content="1"/><link rel="dc:replaces" resource="mwr:revision/6955"/><meta property="mw:revisionSHA1" content="85101b1c040aeb3af8db63f2f0bccf4033bd74c5"/><meta property="dc:modified" content="2024-02-08T15:48:32.000Z"/><meta property="mw:htmlVersion" content="2.8.0"/><meta property="mw:html:version" content="2.8.0"/><link rel="dc:isVersionOf" href="http://localhost:3080/wiki/Talk%3AT356884b"/><base href="http://localhost:3080/wiki/"/><title>Talk:T356884b</title><link rel="stylesheet" href="/w/load.php?lang=en&modules=mediawiki.skinning.content.parsoid%7Cmediawiki.skinning.interface%7Csite.styles&only=styles&skin=vector"/><meta http-equiv="content-language" content="en"/><meta http-equiv="vary" content="Accept"/></head><body id="mwAA" lang="en" class="mw-content-ltr sitedir-ltr ltr mw-body-content parsoid-body mediawiki mw-parser-output" dir="ltr"><section data-mw-section-id="0" id="mwAQ"></section><section data-mw-section-id="1" id="mwAg"><h2 id="test">test</h2>
|
||||
<p id="mwAw">hi <a rel="mw:WikiLink" href="./User:Matma_Rex" title="User:Matma Rex" id="mwBA">Matma Rex</a> 00:01, 7 February 2024 (UTC)</p>
|
||||
<dl id="mwBQ"><dd id="mwBg">hi <small id="mwBw"><a rel="mw:WikiLink" href="./User:Matma_Rex" title="User:Matma Rex" id="mwCA">Matma Rex</a> 00:02, 7 February 2024 (UTC)
|
||||
<dl id="mwCQ"><dd id="mwCg">hi <a rel="mw:WikiLink" href="./User:Matma_Rex" title="User:Matma Rex" id="mwCw">Matma Rex</a> 00:03, 7 February 2024 (UTC)</dd></dl></small></dd></dl></section></body></html>
|
97
tests/cases/signatures-T356884b/signatures-T356884b.json
Normal file
97
tests/cases/signatures-T356884b/signatures-T356884b.json
Normal file
|
@ -0,0 +1,97 @@
|
|||
[
|
||||
{
|
||||
"placeholderHeading": false,
|
||||
"type": "heading",
|
||||
"range": [
|
||||
"1/0/0",
|
||||
"1/0/1"
|
||||
],
|
||||
"headingLevel": 2,
|
||||
"level": 0,
|
||||
"name": "h-Matma_Rex-20240207000100",
|
||||
"id": "h-test-20240207000100",
|
||||
"warnings": [],
|
||||
"replies": [
|
||||
{
|
||||
"type": "comment",
|
||||
"timestamp": "20240207000100",
|
||||
"author": "Matma Rex",
|
||||
"range": [
|
||||
"1/2/0",
|
||||
"1/2/2/29"
|
||||
],
|
||||
"signatureRanges": [
|
||||
[
|
||||
"1/2/1",
|
||||
"1/2/2/29"
|
||||
]
|
||||
],
|
||||
"timestampRanges": [
|
||||
[
|
||||
"1/2/2/1",
|
||||
"1/2/2/29"
|
||||
]
|
||||
],
|
||||
"level": 1,
|
||||
"name": "c-Matma_Rex-20240207000100",
|
||||
"id": "c-Matma_Rex-20240207000100-test",
|
||||
"warnings": [],
|
||||
"replies": [
|
||||
{
|
||||
"type": "comment",
|
||||
"timestamp": "20240207000200",
|
||||
"author": "Matma Rex",
|
||||
"range": [
|
||||
"1/4/0/0",
|
||||
"1/4/0/1/1/29"
|
||||
],
|
||||
"signatureRanges": [
|
||||
[
|
||||
"1/4/0/1/0",
|
||||
"1/4/0/1/1/29"
|
||||
]
|
||||
],
|
||||
"timestampRanges": [
|
||||
[
|
||||
"1/4/0/1/1/1",
|
||||
"1/4/0/1/1/29"
|
||||
]
|
||||
],
|
||||
"level": 2,
|
||||
"name": "c-Matma_Rex-20240207000200",
|
||||
"id": "c-Matma_Rex-20240207000200-Matma_Rex-20240207000100",
|
||||
"warnings": [],
|
||||
"replies": [
|
||||
{
|
||||
"type": "comment",
|
||||
"timestamp": "20240207000300",
|
||||
"author": "Matma Rex",
|
||||
"range": [
|
||||
"1/4/0/1/2/0/0",
|
||||
"1/4/0/1/2/0/2/30"
|
||||
],
|
||||
"signatureRanges": [
|
||||
[
|
||||
"1/4/0/1/2/0/1",
|
||||
"1/4/0/1/2/0/2/30"
|
||||
]
|
||||
],
|
||||
"timestampRanges": [
|
||||
[
|
||||
"1/4/0/1/2/0/2/2",
|
||||
"1/4/0/1/2/0/2/30"
|
||||
]
|
||||
],
|
||||
"level": 3,
|
||||
"name": "c-Matma_Rex-20240207000300",
|
||||
"id": "c-Matma_Rex-20240207000300-Matma_Rex-20240207000200",
|
||||
"warnings": [],
|
||||
"replies": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue