jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/405243 )
Change subject: Hygiene: update unit tests: refs changed from span to sup
......................................................................
Hygiene: update unit tests: refs changed from span to sup
Updates unit tests to account for Parsoid ref change from span to sup.
Bug: T185138
Change-Id: I2e8499f28621c647ed9ec1a8c0cdf306c9ab4298
---
M test/lib/transformations/summarize.js
M test/lib/transforms/transforms-test.js
2 files changed, 14 insertions(+), 14 deletions(-)
Approvals:
BearND: Looks good to me, but someone else must approve
jenkins-bot: Verified
Mholloway: Looks good to me, approved
diff --git a/test/lib/transformations/summarize.js
b/test/lib/transformations/summarize.js
index ec25458..7978aac 100644
--- a/test/lib/transformations/summarize.js
+++ b/test/lib/transformations/summarize.js
@@ -55,7 +55,7 @@
],
// references are stripped
[
- '<p><b>France</b> is a country with territory status in
western Europe and several overseas regions and territories.<span
class="mw-ref" id="cite_ref-twelve_21-0"><a href="#cite_note-twelve-21" <span
class="mw-reflink-text">[upper-roman 13]</span></a></p>',
+ '<p><b>France</b> is a country with territory status in
western Europe and several overseas regions and territories.<sup class="mw-ref"
id="cite_ref-twelve_21-0"><a href="#cite_note-twelve-21"><span
class="mw-reflink-text">[upper-roman 13]</span></a></sup></p>',
'<p><b>France</b> is a country with territory status in
western Europe and several overseas regions and territories.</p>'
],
// Any element with .reference class is stripped (T176519)
@@ -159,7 +159,7 @@
],
// Full stops do not impact the summary length (T173640)
[
- '<p><a href="./Armádní_generál" title="Armádní generál">Arm.
gen.</a> <a href="./Inženýr" title="Inženýr">Ing.</a> <b>Petr Pavel</b>, <span
class="new">M.A.</span>, (*<span> </span><a href="./1._listopad" title="1.
listopad">1.<span> </span>listopadu</a> <a href="./1961"
title="1961">1961</a> <a href="./Planá" title="Planá">Planá</a>) je <a
href="./Česko" title="Česko">český</a> <a href="./Voják"
title="Voják">voják</a>, <a href="./Generál" title="Generál">generál</a> <a
href="./Armáda_České_republiky" title="Armáda České republiky">Armády České
republiky</a> a<span> </span>od června 2015 <a
href="./Předseda_vojenského_výboru_NATO" title="Předseda vojenského výboru
NATO">předseda vojenského výboru NATO</a>. Jako první zástupce zemí bývalé <a
href="./Varšavská_smlouva" title="Varšavská smlouva">Varšavské smlouvy</a> tak
nastoupil do nejvyšší vojenské funkce <a href="./Severoatlantická_aliance"
title="Severoatlantická aliance">Severoatlantické aliance</a>.<span
class="mw-ref" id="cite_ref-nastup_NATO_1-0"><a
href="./Petr_Pavel#cite_note-nastup_NATO-1" style="counter-reset: mw-Ref
1;"><span class="mw-reflink-text">[1]</span></a></span><span class="mw-ref"
id="cite_ref-ihned_2-0"><a href="./Petr_Pavel#cite_note-ihned-2"
style="counter-reset: mw-Ref 2;"><span
class="mw-reflink-text">[2]</span></a></span></p>',
+ '<p><a href="./Armádní_generál" title="Armádní generál">Arm.
gen.</a> <a href="./Inženýr" title="Inženýr">Ing.</a> <b>Petr Pavel</b>, <span
class="new">M.A.</span>, (*<span> </span><a href="./1._listopad" title="1.
listopad">1.<span> </span>listopadu</a> <a href="./1961"
title="1961">1961</a> <a href="./Planá" title="Planá">Planá</a>) je <a
href="./Česko" title="Česko">český</a> <a href="./Voják"
title="Voják">voják</a>, <a href="./Generál" title="Generál">generál</a> <a
href="./Armáda_České_republiky" title="Armáda České republiky">Armády České
republiky</a> a<span> </span>od června 2015 <a
href="./Předseda_vojenského_výboru_NATO" title="Předseda vojenského výboru
NATO">předseda vojenského výboru NATO</a>. Jako první zástupce zemí bývalé <a
href="./Varšavská_smlouva" title="Varšavská smlouva">Varšavské smlouvy</a> tak
nastoupil do nejvyšší vojenské funkce <a href="./Severoatlantická_aliance"
title="Severoatlantická aliance">Severoatlantické aliance</a>.<sup
class="mw-ref" id="cite_ref-nastup_NATO_1-0"><a
href="./Petr_Pavel#cite_note-nastup_NATO-1" style="counter-reset: mw-Ref
1;"><span class="mw-reflink-text">[1]</span></a></sup><sup class="mw-ref"
id="cite_ref-ihned_2-0"><a href="./Petr_Pavel#cite_note-ihned-2"
style="counter-reset: mw-Ref 2;"><span
class="mw-reflink-text">[2]</span></a></sup></p>',
'<p>Arm. gen. Ing. <b>Petr Pavel</b>, <span
class="new">M.A.</span>, je český voják, generál Armády České republiky
a<span> </span>od června 2015 předseda vojenského výboru NATO. Jako první
zástupce zemí bývalé Varšavské smlouvy tak nastoupil do nejvyšší vojenské
funkce Severoatlantické aliance.</p>'
],
// Bold tags are retained
diff --git a/test/lib/transforms/transforms-test.js
b/test/lib/transforms/transforms-test.js
index 049a5a8..8440d11 100644
--- a/test/lib/transforms/transforms-test.js
+++ b/test/lib/transforms/transforms-test.js
@@ -7,29 +7,29 @@
describe('lib:size-transforms', () => {
const buildHtml = (title) => {
return domino.createDocument('<body>'
- + '<span class="mw-ref">'
+ + '<sup class="mw-ref">'
+ `<a href="${title}#cite_note-foo"><span>[1]</span></a>`
- + '</span>'
- + '<span class="mw-ref">'
+ + '</sup>'
+ + '<sup class="mw-ref">'
+ `<a href="${title}#cite_note-foo"><span>[2]</span></a>`
- + '</span>'
- + '<span class="mw-ref">'
+ + '</sup>'
+ + '<sup class="mw-ref">'
+ `<a
href="anythingElse${title}#cite_note-foo"><span>[2]</span></a>`
- + '</span>'
+ + '</sup>'
+ '</body>');
};
const buildHtml2 = () => {
return domino.createDocument('<body>'
- + '<span class="mw-ref">'
+ + '<sup class="mw-ref">'
+ `<a href="A_"B"_C#cite_note-foo"><span>[1]</span></a>`
- + '</span>'
- + '<span class="mw-ref">'
+ + '</sup>'
+ + '<sup class="mw-ref">'
+ `<a href="A_"B"_C#cite_note-foo"><span>[2]</span></a>`
- + '</span>'
- + '<span class="mw-ref">'
+ + '</sup>'
+ + '<sup class="mw-ref">'
+ `<a
href="anythingElseA_"B"_C#cite_note-foo"><span>[2]</span></a>`
- + '</span>'
+ + '</sup>'
+ '</body>');
};
--
To view, visit https://gerrit.wikimedia.org/r/405243
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2e8499f28621c647ed9ec1a8c0cdf306c9ab4298
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Fjalapeno <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Mholloway <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>
Gerrit-Reviewer: Ppchelko <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits