Inez has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84186


Change subject: Modify mockAPI to return correct answer for not existing files
......................................................................

Modify mockAPI to return correct answer for not existing files

This change fixes couple of wt2wt tests, because what previously was parser
to <figure> now is handled as <meta> placeholder so there is no information lost
while serializing

Change-Id: Iec1ec2f099dd6d850d70aa4e48e813cd4ade07c7
---
M js/tests/mockAPI.js
M js/tests/parserTests-blacklist.js
2 files changed, 15 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/86/84186/1

diff --git a/js/tests/mockAPI.js b/js/tests/mockAPI.js
index 0825182..ce1628f 100644
--- a/js/tests/mockAPI.js
+++ b/js/tests/mockAPI.js
@@ -87,6 +87,21 @@
                        var filename = body.titles,
                                normPagename = pnames[filename] || filename,
                                normFilename = fnames[filename] || filename;
+                       if(!(normFilename in FILE_PROPS )) {
+                               cb( null, {
+                                       'query': {
+                                               'pages': {
+                                                       '-1': {
+                                                               'ns': 6,
+                                                               'title': 
filename,
+                                                               'missing': '',
+                                                               
'imagerepository': ''
+                                                       }
+                                               }
+                                       }
+                               } );
+                               return;
+                       }
                        var props = FILE_PROPS[normFilename] || 
Object.create(null);
                        var md5 = crypto.createHash('md5').update(normFilename).
                                digest('hex');
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index b9f4dca..6940770 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -615,8 +615,6 @@
 add("wt2wt", "pre-save transform: Signature expansion");
 add("wt2wt", "pre-save transform: Signature expansion in nowiki tags (bug 
93)");
 add("wt2wt", "Image with multiple captions -- only last one is accepted 
(parsoid)");
-add("wt2wt", "SVG thumbnails with language de");
-add("wt2wt", "SVG thumbnails with invalid language code");
 add("wt2wt", "BUG 561: {{/Subpage}}");
 add("wt2wt", "Handling of sections up to level 6 and beyond");
 add("wt2wt", "div with single-quoted attribute");
@@ -671,7 +669,6 @@
 add("wt2wt", "Free external link invading image caption");
 add("wt2wt", "preload: check that it doesn't try to do tricks");
 add("wt2wt", "HTML5 data attributes");
-add("wt2wt", "percent-encoding and + signs in internal links (Bug 26410)");
 add("wt2wt", "Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed 
external links");
 add("wt2wt", "Bug31490 Turkish: ucfırst (with a dotless i)");
 add("wt2wt", "Bug31490 ucfırst (with a dotless i) with English language");

-- 
To view, visit https://gerrit.wikimedia.org/r/84186
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec1ec2f099dd6d850d70aa4e48e813cd4ade07c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Inez <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to