Sync up Cite repo tests with Parsoid + (en/dis)able some Parsoid tests

* This now aligns with Parsoid commit 0fab92ba453d424aedeadaaa9e1514c42bbd94d1
* Disabled the newly added tests because that Parsoid fixes for the
  tests haven't been released to vendor to let CI pass these tests.
* Re-enabled a previously disabled test.

Change-Id: I4ab87d2d486b7a1fef652c50c4f1e79ddfe83ce6
This commit is contained in:
Subramanya Sastry 2023-12-15 13:46:50 -06:00
parent e64d944194
commit 58f008ae1e

View file

@ -2960,16 +2960,16 @@ blah unicode u2028 whitespace<sup id="cite_ref-a_b_3-1" class="reference"><a hre
<li id="cite_note-a_b-3"><span class="mw-cite-backlink">↑ <sup><a href="#cite_ref-a_b_3-0">3.0</a></sup> <sup><a href="#cite_ref-a_b_3-1">3.1</a></sup></span> <span class="reference-text">testUnicodeWhitespaceRef</span> <li id="cite_note-a_b-3"><span class="mw-cite-backlink">↑ <sup><a href="#cite_ref-a_b_3-0">3.0</a></sup> <sup><a href="#cite_ref-a_b_3-1">3.1</a></sup></span> <span class="reference-text">testUnicodeWhitespaceRef</span>
</li> </li>
</ol></div> </ol></div>
!! html/parsoid+disabled !! html/parsoid
<p>test space<sup about="#mwt2" class="mw-ref reference" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a b"},"body":{"id":"mw-reference-text-cite_note-a_b-1"}}'><a href="./Parser_test#cite_note-a_b-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup> <p>test space<sup about="#mwt2" class="mw-ref reference" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a b"},"body":{"id":"mw-reference-text-cite_note-a_b-1"}}'><a href="./Parser_test#cite_note-a_b-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
blah space<sup about="#mwt4" class="mw-ref reference" id="cite_ref-a_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a b"}}'><a href="./Parser_test#cite_note-a_b-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p> blah space<sup about="#mwt4" class="mw-ref reference" id="cite_ref-a_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a b"}}'><a href="./Parser_test#cite_note-a_b-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
<p>test underbar<sup about="#mwt6" class="mw-ref reference" id="cite_ref-a_b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a_b"},"body":{"id":"mw-reference-text-cite_note-a_b-2"}}'><a href="./Parser_test#cite_note-a_b-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup> <p>test underbar<sup about="#mwt6" class="mw-ref reference" id="cite_ref-a_b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a_b"},"body":{"id":"mw-reference-text-cite_note-a_b-2"}}'><a href="./Parser_test#cite_note-a_b-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup>
blah underbar<sup about="#mwt8" class="mw-ref reference" id="cite_ref-a_b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a_b"}}'><a href="./Parser_test#cite_note-a_b-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup></p> blah underbar<sup about="#mwt8" class="mw-ref reference" id="cite_ref-a_b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a_b"}}'><a href="./Parser_test#cite_note-a_b-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup></p>
<p>test unicode u2028 whitespace<sup about="#mwt10" class="mw-ref reference" id="cite_ref-ab_3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a\u2028b"},"body":{"id":"mw-reference-text-cite_note-a\u2028b-3"}}'><a href="./Parser_test#cite_note-ab-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup> <p>test unicode u2028 whitespace<sup about="#mwt10" class="mw-ref reference" id="cite_ref-a_b_3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a\u2028b"},"body":{"id":"mw-reference-text-cite_note-a_b-3"}}'><a href="./Parser_test#cite_note-a_b-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup>
blah unicode u2028 whitespace<sup about="#mwt12" class="mw-ref reference" id="cite_ref-ab_3-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a\u2028b"}}'><a href="./Parser_test#cite_note-ab-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p> blah unicode u2028 whitespace<sup about="#mwt12" class="mw-ref reference" id="cite_ref-a_b_3-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a\u2028b"}}'><a href="./Parser_test#cite_note-a_b-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p>
<div class="mw-references-wrap" typeof="mw:Extension/references" about="#mwt14" data-mw='{"name":"references","attrs":{}}'><ol class="mw-references references"><li about="#cite_note-a_b-1" id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="./Parser_test#cite_ref-a_b_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Parser_test#cite_ref-a_b_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_b-1" class="mw-reference-text">testSpaceRef</span></li><li about="#cite_note-a_b-2" id="cite_note-a_b-2"><span rel="mw:referencedBy"><a href="./Parser_test#cite_ref-a_b_2-0"><span class="mw-linkback-text">1 </span></a><a href="./Parser_test#cite_ref-a_b_2-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_b-2" class="mw-reference-text">testUnderbarRef</span></li><li about="#cite_note-ab-3" id="cite_note-ab-3"><span rel="mw:referencedBy"><a href="./Parser_test#cite_ref-ab_3-0"><span class="mw-linkback-text">1 </span></a><a href="./Parser_test#cite_ref-ab_3-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-ab-3" class="mw-reference-text">testUnicodeWhitespaceRef</span></li></ol></div> <div class="mw-references-wrap" typeof="mw:Extension/references" about="#mwt14" data-mw='{"name":"references","attrs":{}}'><ol class="mw-references references"><li about="#cite_note-a_b-1" id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="./Parser_test#cite_ref-a_b_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Parser_test#cite_ref-a_b_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_b-1" class="mw-reference-text">testSpaceRef</span></li><li about="#cite_note-a_b-2" id="cite_note-a_b-2"><span rel="mw:referencedBy"><a href="./Parser_test#cite_ref-a_b_2-0"><span class="mw-linkback-text">1 </span></a><a href="./Parser_test#cite_ref-a_b_2-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_b-2" class="mw-reference-text">testUnderbarRef</span></li><li about="#cite_note-a_b-3" id="cite_note-a_b-3"><span rel="mw:referencedBy"><a href="./Parser_test#cite_ref-a_b_3-0"><span class="mw-linkback-text">1 </span></a><a href="./Parser_test#cite_ref-a_b_3-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_b-3" class="mw-reference-text">testUnicodeWhitespaceRef</span></li></ol></div>
!! end !! end
!! test !! test
@ -3051,3 +3051,54 @@ Red links in templated references
<div class="mw-references-wrap" typeof="mw:Extension/references mw:Transclusion" about="#mwt5" data-parsoid='{"selfClose":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"1x","href":"./Template:1x"},"params":{"1":{"wt":"&lt;references />"}},"i":0}}]}'><ol class="mw-references references"><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Not_existing_article?action=edit&amp;redlink=1" title="Not existing article" class="new" typeof="mw:LocalizedAttrs" data-parsoid='{"stx":"simple","a":{"href":"./Not_existing_article"},"sa":{"href":"Not_existing_article"}}' data-mw-i18n='{"title":{"lang":"x-page","key":"red-link-title","params":["Not existing article"]}}'>Not_existing_article</a></span></li></ol></div> <div class="mw-references-wrap" typeof="mw:Extension/references mw:Transclusion" about="#mwt5" data-parsoid='{"selfClose":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"1x","href":"./Template:1x"},"params":{"1":{"wt":"&lt;references />"}},"i":0}}]}'><ol class="mw-references references"><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Not_existing_article?action=edit&amp;redlink=1" title="Not existing article" class="new" typeof="mw:LocalizedAttrs" data-parsoid='{"stx":"simple","a":{"href":"./Not_existing_article"},"sa":{"href":"Not_existing_article"}}' data-mw-i18n='{"title":{"lang":"x-page","key":"red-link-title","params":["Not existing article"]}}'>Not_existing_article</a></span></li></ol></div>
!! end !! end
# ->wt direction fails on this one because the first paragraph/i swallows the second one,
# and the ref is lost
!! test
Broken wikitext making a ref as extended attribute and a duplicated fragment
!! options
parsoid={
"modes": ["wt2html"]
}
!! wikitext
<i <ref>y</ref>>
z
<references />
!! html/php
<p><i id="cite_ref-1" class="reference">
</i></p><p><i id="cite_ref-1" class="reference">z
</i></p><i id="cite_ref-1" class="reference"><div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">y</span>
</li>
</ol></div></i>
!! html/parsoid+disabled
<p><i about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"&lt;ref>y&lt;/ref>":null},"sa":{"&lt;ref>y&lt;/ref>":""},"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'></i></p><i about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"&lt;ref>y&lt;/ref>":null},"sa":{"&lt;ref>y&lt;/ref>":""},"autoInsertedStart":true,"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"","html":"&lt;sup about=\"#mwt2\" class=\"mw-ref reference\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid=&apos;{\"dsr\":[3,15,5,6]}&apos; data-mw=&apos;{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}&apos;>&lt;a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\">&lt;span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]&lt;/span>&lt;/a>&lt;/sup>"},{"html":""}]]}'>
<p>z</p>
<div class="mw-references-wrap" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><ol class="mw-references references"><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">y</span></li></ol></div></i>
!! end
!! test
Broken wikitext making a ref as extended attribute and a duplicated fragment (with 2wt tests)
!! wikitext
<i title="<ref>y</ref>">a
z
<references />
!! html/php
<p><i title="&lt;sup id=" class="reference">a
</i></p><p><i title="&lt;sup id=" class="reference">z
</i></p><i title="&lt;sup id=" class="reference"><div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">y</span>
</li>
</ol></div></i>
!! html/parsoid+disabled
<p><i title="" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":""},"sa":{"title":"&lt;ref>y&lt;/ref>"},"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"title"},{"html":""}]]}'>a</i></p><i title="" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":""},"sa":{"title":"&lt;ref>y&lt;/ref>"},"autoInsertedStart":true,"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"title"},{"html":"&lt;sup about=\"#mwt2\" class=\"mw-ref reference\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid=&apos;{\"dsr\":[10,22,5,6]}&apos; data-mw=&apos;{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}&apos;>&lt;a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\">&lt;span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]&lt;/span>&lt;/a>&lt;/sup>"}]]}'>
<p>z</p>
<div class="mw-references-wrap" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><ol class="mw-references references"><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">y</span></li></ol></div></i>
!! end