mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Merge "ve-cite: Update CSS classes in tests"
This commit is contained in:
commit
ca53985924
|
@ -32,31 +32,32 @@ ve.dm.citeExample.domToDataCases = {
|
|||
//
|
||||
// <references group="g1"><ref group="g1" name="foo">Ref in refs</ref></references>
|
||||
body:
|
||||
'<p>Foo' +
|
||||
'<sup about="#mwt1" class="reference" data-mw="{"name":"ref","attrs":{"name":"bar"}}" id="cite_ref-bar-1-0" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<p>' +
|
||||
'Foo' +
|
||||
'<sup about="#mwt1" class="mw-ref reference" data-mw="{"name":"ref","attrs":{"name":"bar"}}" id="cite_ref-bar-1-0" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<a href="#cite_note-bar-1">[1]</a>' +
|
||||
'</sup>' +
|
||||
' Baz' +
|
||||
'<sup about="#mwt2" class="reference" data-mw="{"name":"ref","body":{"html":"Quux"},"attrs":{"group":"g1","name":":0"}}" id="cite_ref-quux-2-0" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<sup about="#mwt2" class="mw-ref reference" data-mw="{"name":"ref","body":{"html":"Quux"},"attrs":{"group":"g1","name":":0"}}" id="cite_ref-quux-2-0" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<a href="#cite_note-.3A0-2">[g1 1]</a>' +
|
||||
'</sup>' +
|
||||
' Whee' +
|
||||
'<sup about="#mwt3" class="reference" data-mw="{"name":"ref","body":{"html":"' +
|
||||
'<sup about="#mwt3" class="mw-ref reference" data-mw="{"name":"ref","body":{"html":"' +
|
||||
'<a rel=\\"mw:WikiLink\\" href=\\"./Bar\\">Bar' +
|
||||
'</a>"},"attrs":{"name":"bar"}}" id="cite_ref-bar-1-1" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<a href="#cite_note-bar-1">[1]</a>' +
|
||||
'</sup>' +
|
||||
' Yay' +
|
||||
// This reference has .body.id instead of .body.html
|
||||
'<sup about="#mwt4" class="reference" data-mw="{"name":"ref","body":{"id":"mw-cite-3"},"attrs":{"group":"g1"}}" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<sup about="#mwt4" class="mw-ref reference" data-mw="{"name":"ref","body":{"id":"mw-cite-3"},"attrs":{"group":"g1"}}" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<a href="#cite_note-3">[g1 2]</a>' +
|
||||
'</sup>' +
|
||||
' Quux' +
|
||||
'<sup about="#mwt5" class="reference" data-mw="{"name":"ref","body":{"html":"Different content"},"attrs":{"name":"bar"}}" id="cite_ref-bar-1-2" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<sup about="#mwt5" class="mw-ref reference" data-mw="{"name":"ref","body":{"html":"Different content"},"attrs":{"name":"bar"}}" id="cite_ref-bar-1-2" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<a href="#cite_note-bar-1">[1]</a>' +
|
||||
'</sup>' +
|
||||
' Foo' +
|
||||
'<sup about="#mwt6" class="reference" data-mw="{"name":"ref","attrs":{"group":"g1","name":"foo"}}" ' +
|
||||
'<sup about="#mwt6" class="mw-ref reference" data-mw="{"name":"ref","attrs":{"group":"g1","name":"foo"}}" ' +
|
||||
'id="cite_ref-foo-4" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
'<a href="#cite_ref-foo-4">[g1 3]</a>' +
|
||||
'</sup>' +
|
||||
|
@ -65,7 +66,7 @@ ve.dm.citeExample.domToDataCases = {
|
|||
// which Parsoid doesn't do yet, but T88290 asks for
|
||||
'<ol class="references" typeof="mw:Extension/references" about="#mwt7"' +
|
||||
'data-mw="{"name":"references","body":{' +
|
||||
'"html":"<sup about=\\"#mwt8\\" class=\\"reference\\" ' +
|
||||
'"html":"<sup about=\\"#mwt8\\" class=\\"mw-ref reference\\" ' +
|
||||
'data-mw=\\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;Ref in refs&quot;},' +
|
||||
'&quot;attrs&quot;:{&quot;group&quot;:&quot;g1&quot;,&quot;name&quot;:&quot;foo&quot;}}\\" ' +
|
||||
'rel=\\"dc:references\\" typeof=\\"mw:Extension/ref\\">' +
|
||||
|
@ -75,7 +76,8 @@ ve.dm.citeExample.domToDataCases = {
|
|||
'<li about="#cite_note-foo-4" id="cite_note-foo-4"><span rel="mw:referencedBy"><a href="#cite_ref-foo_4-0">↑</a></span> <span id="mw-cite-foo">Ref in refs</span></li>' +
|
||||
'</ol>',
|
||||
fromDataBody:
|
||||
'<p>Foo' +
|
||||
'<p>' +
|
||||
'Foo' +
|
||||
'<sup data-mw="{"name":"ref","attrs":{"name":"bar"}}" typeof="mw:Extension/ref">' +
|
||||
'</sup>' +
|
||||
' Baz' +
|
||||
|
@ -105,7 +107,8 @@ ve.dm.citeExample.domToDataCases = {
|
|||
'</sup>"}}">' +
|
||||
'</div>',
|
||||
clipboardBody:
|
||||
'<p>Foo' +
|
||||
'<p>' +
|
||||
'Foo' +
|
||||
'<sup typeof="mw:Extension/ref" data-mw="{"name":"ref","attrs":{"name":"bar"}}" class="mw-ref reference">' +
|
||||
'<a style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a>' +
|
||||
'</sup>' +
|
||||
|
@ -251,10 +254,10 @@ ve.dm.citeExample.domToDataCases = {
|
|||
name: 'references',
|
||||
attrs: { group: 'g1' },
|
||||
body: {
|
||||
html: '<sup about="#mwt8" class="reference" data-mw="{"name":"ref","body":{"html":"Ref in refs"},"attrs":{"group":"g1","name":"foo"}}" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-foo-3">[3]</a></sup>'
|
||||
html: '<sup about="#mwt8" class="mw-ref reference" data-mw="{"name":"ref","body":{"html":"Ref in refs"},"attrs":{"group":"g1","name":"foo"}}" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-foo-3">[3]</a></sup>'
|
||||
}
|
||||
},
|
||||
originalMw: '{"name":"references","body":{"html":"<sup about=\\"#mwt8\\" class=\\"reference\\" data-mw=\\"{"name":"ref","body":{"html":"Ref in refs"},"attrs":{"group":"g1","name":"foo"}}\\" rel=\\"dc:references\\" typeof=\\"mw:Extension/ref\\"><a href=\\"#cite_note-foo-3\\">[3]</a></sup>"},"attrs":{"group":"g1"}}',
|
||||
originalMw: '{"name":"references","body":{"html":"<sup about=\\"#mwt8\\" class=\\"mw-ref reference\\" data-mw=\\"{"name":"ref","body":{"html":"Ref in refs"},"attrs":{"group":"g1","name":"foo"}}\\" rel=\\"dc:references\\" typeof=\\"mw:Extension/ref\\"><a href=\\"#cite_note-foo-3\\">[3]</a></sup>"},"attrs":{"group":"g1"}}',
|
||||
listGroup: 'mwReference/g1',
|
||||
refGroup: 'g1',
|
||||
isResponsive: true,
|
||||
|
@ -337,7 +340,7 @@ ve.dm.citeExample.domToDataCases = {
|
|||
]
|
||||
},
|
||||
'mw:Reference with comment': {
|
||||
body: '<p><sup about="#mwt2" class="reference" ' +
|
||||
body: '<p><sup about="#mwt2" class="mw-ref reference" ' +
|
||||
'data-mw="{"name":"ref","body":' +
|
||||
'{"html":"Foo<!-- bar -->"},"attrs":{}}" ' +
|
||||
'id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref">' +
|
||||
|
|
Loading…
Reference in a new issue