mediawiki-extensions-Discus.../tests/cases
Bartosz Dziewoński 5b26e9664b CommentFormatter: Fix inserting placeholder heading marker
This code expected $container->firstChild to be a
<div class="mw-parser-output">, but that element is not present
when we're running on HTML to be saved in parser cache.

We ended up inserting the marker inside whatever node was the
first on the page, and if it was a <style> element, both our
marker and the styles would be lost when serializing, like in
6c7a0ca9a2.

When we're running on final HTML, the marker will now be outside
of <div class="mw-parser-output">, but that seems to be fine. Only
early versions of I4e60fdbc098c1a74757d6e60fec6bcf8e5db37c1 had
problems with that (see comments on patchset 41), but it works now.

The added test case also covers the fix for T274709.

Bug: T275440
Change-Id: I38d45dd8686919be51e1d307ded12b0afe185eb5
2021-02-24 20:32:48 +01:00
..
ar-nbsp-timezone-oldparser Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
ar-nbsp-timezone-parsoid Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
ar-no-paragraph-oldparser CommentFormatter: Fix inserting placeholder heading marker 2021-02-24 20:32:48 +01:00
ar-no-paragraph-parsoid Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
ckb-big-oldparser Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
ckb-big-parsoid Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
en-big-oldparser Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
en-big-parsoid Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
en-bigafd-parsoid Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
fallback-encoding-link Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
for-parser-cache CommentFormatter: Fix inserting placeholder heading marker 2021-02-24 20:32:48 +01:00
fr-unsigned-oldparser Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
fr-unsigned-parsoid Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
it-unsigned-oldparser Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
it-unsigned-parsoid Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
linearWalk Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
lrm-signature Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
mixed-indentation Disambiguate comments by parent ID, rather than sequential numbers 2020-10-22 02:19:21 +02:00
no-heading Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
parsoid-sections Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
pl-big-oldparser Merge "Fix replying outside wrappers for partially indented comments" 2021-02-11 00:09:48 +00:00
pl-big-parsoid Merge "Fix replying outside wrappers for partially indented comments" 2021-02-11 00:09:48 +00:00
signatures-comments Handle category links at ends of comments affecting indentation 2021-01-26 04:55:03 +01:00
signatures-funny Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
split-list Disambiguate comments by parent ID, rather than sequential numbers 2020-10-22 02:19:21 +02:00
split-list2 Disambiguate comments by parent ID, rather than sequential numbers 2020-10-22 02:19:21 +02:00
sr-ec Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
sr-el Truncate user generated part of IDs to 80 characters 2021-02-03 15:04:58 +00:00
transclusions Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
unclosed-font CommentFormatter: Fix inserting placeholder heading marker 2021-02-24 20:32:48 +01:00
wrappers Fix replying outside wrappers for partially indented comments 2021-02-08 22:18:37 +01:00
authors.json Create ThreadItem classes 2020-06-12 20:35:59 +01:00
comments.json Add tests covering it.wp unsigned comment template 2020-11-25 02:08:03 +01:00
datatest-ckb.json Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
datatest-en.json Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
datatest-sr.json Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
datatest-th.json Use tabs for indentation in JSON test files 2021-01-27 00:25:15 +00:00
formattedreply.json CommentFormatter: Fix inserting placeholder heading marker 2021-02-24 20:32:48 +01:00
isHtmlSigned.json Improve detecting typed signatures 2020-07-22 00:00:53 +02:00
isWikitextSigned.json Improve detecting typed signatures 2020-07-22 00:00:53 +02:00
linearWalk.json Fix skipping to the end of paragraph, now it considers nested tags 2021-01-18 18:20:20 +00:00
modified.json Broken test cases for a big mess of <font> tags 2021-01-18 18:20:13 +00:00
README.txt Broken test cases for a big mess of <font> tags 2021-01-18 18:20:13 +00:00
reply.json Tests covering fr.wp unsigned comment templates 2020-05-28 00:13:07 +02:00
sanitize-wikitext-linebreaks.json Move wikitext modifiers to modifier.js 2020-07-01 17:06:02 +01:00
timestamp-parser-dst.json Move /cases and /data up to /tests 2020-05-18 21:47:17 +01:00
timestamp-parser.json Move /cases and /data up to /tests 2020-05-18 21:47:17 +01:00
timestamp-regex.json Move /cases and /data up to /tests 2020-05-18 21:47:17 +01:00
transcluded.json Add tests covering it.wp unsigned comment template 2020-11-25 02:08:03 +01:00
unwrap.json Allow non-lists to be passed to unwrapList 2020-06-24 19:19:06 +01:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

To update the expected outputs, run the PHP tests with the environment variable
"DISCUSSIONTOOLS_OVERWRITE_TESTS" set to any value, e.g.:

     DISCUSSIONTOOLS_OVERWRITE_TESTS=1 php tests/phpunit/phpunit.php extensions/DiscussionTools/tests/phpunit/


The input HTML files were saved from:

pl-big:
https://pl.wikipedia.org/w/index.php?action=render&title=Wikipedia:Kawiarenka/Artyku%C5%82y_dyskusja/Archiwum/2018-pa%C5%BAdziernik&oldid=55171451
https://pl.wikipedia.org/api/rest_v1/page/html/Wikipedia%3AKawiarenka%2FArtyku%C5%82y_dyskusja%2FArchiwum%2F2018-pa%C5%BAdziernik/55171451

en-big:
https://en.wikipedia.org/w/index.php?action=render&title=Wikipedia:Village_pump_(technical)/Archive_175&oldid=913983958
https://en.wikipedia.org/api/rest_v1/page/html/Wikipedia%3AVillage_pump_(technical)%2FArchive_175/913983958

ckb-big:
https://ckb.wikipedia.org/w/index.php?title=ویکیپیدیا:دیوەخان_(پێشنیارەکان)&oldid=638545&action=render
https://ckb.wikipedia.org/api/rest_v1/page/html/ویکیپیدیا%3Aدیوەخان_(پێشنیارەکان)/638545

en-bigafd:
https://en.wikipedia.org/api/rest_v1/page/html/Wikipedia%3AArticles_for_deletion%2FLog%2F2020_March_7

ar-no-paragraph:
https://ar.wikipedia.org/w/index.php?action=render&title=نقاش_المستخدم:Khaled&oldid=45576943
https://ar.wikipedia.org/api/rest_v1/page/html/نقاش_المستخدم%3AKhaled/45576943

ar-nbsp-timezone:
https://ar.wikipedia.org/wiki/ويكيبيديا:إخفاء_أرقام_الآي_بي?oldid=46583196&action=render
https://ar.wikipedia.org/api/rest_v1/page/html/ويكيبيديا%3Aإخفاء_أرقام_الآي_بي/46583196

fr-unsigned:
https://fr.wikipedia.org/w/index.php?title=Discussion:Le_Monde&oldid=170426593&action=render
https://fr.wikipedia.org/api/rest_v1/page/html/Discussion%3ALe_Monde/170426593

it-unsigned:
https://it.wikipedia.org/w/index.php?title=Aiuto:Sportello_informazioni&oldid=116856029&action=render
https://it.wikipedia.org/api/rest_v1/page/html/Aiuto%3ASportello_informazioni/116856029

sr-ec:
https://sr.wikipedia.org/w/index.php?title=Википедија:Трг/Архива/Техника/35&variant=sr-ec&action=render

sr-el:
https://sr.wikipedia.org/w/index.php?title=Википедија:Трг/Архива/Техника/35&variant=sr-el&action=render

unclosed-font:
https://nl.wikipedia.org/w/index.php?title=Overleg_gebruiker:RYasmeen_(WMF)&oldid=57970619&action=render

Text is available under the Creative Commons Attribution-ShareAlike License.
See these pages for attribution.