jenkins-bot has submitted this change and it was merged. Change subject: Use v3 API in roundtrip-test.js ......................................................................
Use v3 API in roundtrip-test.js Change-Id: I30aebda9f6b3146f041ee40203d0ab78c72abb8d --- M package.json M tests/roundtrip-test.js 2 files changed, 7 insertions(+), 6 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index 6dd3c2b..31e2b10 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "dump-tokenizer": "node lib/mediawiki.tokenizer.peg.js", "mocha": "mocha --opts tests/mocha/mocha.opts tests/mocha", "parserTests": "node tests/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist", + "roundtrip": "node tests/roundtrip-test.js 'Barack Obama' && node tests/roundtrip-test.js 'Parkour'", "test": "npm run lint-no-0.8 && npm run parserTests && npm run mocha", "cover-mocha": "istanbul cover _mocha --dir ./coverage/mocha -- --opts tests/mocha/mocha.opts tests/mocha", "cover-parserTests": "istanbul cover tests/parserTests.js --dir ./coverage/parserTests -- --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist", diff --git a/tests/roundtrip-test.js b/tests/roundtrip-test.js index 8be36f8..2725f1c 100755 --- a/tests/roundtrip-test.js +++ b/tests/roundtrip-test.js @@ -461,15 +461,15 @@ if (!/\/$/.test(uri)) { uri += '/'; } - uri += 'v2/' + options.domain + '/'; + uri += options.domain + '/v3/transform/'; if (options.html2wt) { - uri += 'wt/' + title; + uri += 'html/to/wikitext/' + title; if (options.oldid) { uri += '/' + options.oldid; } httpOptions.body.scrubWikitext = true; } else { // wt2html - uri += 'pagebundle/' + title; + uri += 'wikitext/to/pagebundle/' + title; } httpOptions.uri = uri; @@ -491,7 +491,7 @@ var str; if (options.html2wt) { prefix += 'html:'; - str = body.wikitext.body; + str = body; } else { prefix += 'wt:'; str = body.html.body; @@ -602,7 +602,7 @@ }, parsoidOptions); return parsoidPost(env, options); }).then(function(body) { - data.newWt = body.wikitext.body; + data.newWt = body; return roundTripDiff(env, parsoidOptions, data); }).then(function(results) { data.diffs = results; @@ -629,7 +629,7 @@ }, parsoidOptions); return parsoidPost(env, options); }).then(function(body) { - var out = body.wikitext.body; + var out = body; // Finish the total time now // FIXME: Is the right place to end it? -- To view, visit https://gerrit.wikimedia.org/r/242611 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30aebda9f6b3146f041ee40203d0ab78c72abb8d Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Cscott <canan...@wikimedia.org> Gerrit-Reviewer: Arlolra <abrea...@wikimedia.org> Gerrit-Reviewer: Cscott <canan...@wikimedia.org> Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits