Add missing parser tests for relevant responsive edge cases

I tried to run these tests with a very old version of this code base
(from 2018) to confirm this is the correct behavior.

Bug: T241303
Change-Id: Id97d016b199458aa178ca732282e9c0e91e291a4
This commit is contained in:
Thiemo Kreuz 2019-12-28 19:29:24 +01:00 committed by Thiemo Kreuz (WMDE)
parent 6f3fa70913
commit 38d5bd5f39

View file

@ -64,6 +64,38 @@ wgCiteResponsiveReferences=true
</ol> </ol>
!! end !! end
!! test
T241303: responsive attribute with no value should *not* disable the wrapper <div>
!! config
wgCiteResponsiveReferences=true
!! wikitext
<ref>a</ref>
<references responsive />
!! html/php
<p><sup id="cite_ref-1" class="reference"><a href="#cite_note-1">&#91;1&#93;</a></sup>
</p>
<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">a</span>
</li>
</ol></div>
!! end
!! test
T241303: responsive attribute with an empty value should *not* disable the wrapper <div>
!! config
wgCiteResponsiveReferences=true
!! wikitext
<ref>a</ref>
<references responsive="" />
!! html/php
<p><sup id="cite_ref-1" class="reference"><a href="#cite_note-1">&#91;1&#93;</a></sup>
</p>
<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">a</span>
</li>
</ol></div>
!! end
!! test !! test
9 references should *not* enable the column mode 9 references should *not* enable the column mode
!! config !! config