jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403580 )
Change subject: Fix: preview page URL for 404 RESTBase responses ...................................................................... Fix: preview page URL for 404 RESTBase responses Functional changes: - Require page URL when constructing a PreviewModel null object. These models have valid titles and are used to display a preview when an extract is unobtainable. When presented with an empty URL, their linkage incorrectly pointed to the browser's current URL. Additional tests were added to verify the fix. - Check missing title in addition to falsy response in RESTBase gateway and update the test assertion to check title. It isn't clear if this can happen in the wild. - Forbid state mutation in the conclusion of MediaWikiGateway.getPageSummary() with a call to Deferred.promise(). This is consistent with the rest of repo including RESTBaseGateway. http://api.jquery.com/deferred.promise/ Nonfunctional changes: - Collapse two RESTBase gateway 404 tests into one as the scenarios and expectations were very similar. - Add failure HTTP status to 'MediaWiki API gateway handles API failure' test stub HTTP response for consistency with other cases. - Add nullity expectations to JSDocs touched and fix a couple typos throughout. - Make the gateway tests a little more consistent by collapsing Deferred variable usage where appropriate. This change is necessary to the completion of T183151 which uses the PreviewModel null objects for additional error cases. Bug: T183151 Change-Id: Ib77627fb9c80d8e806208bbafcfc615b130e3278 --- M resources/dist/index.js M resources/dist/index.js.json M src/gateway/mediawiki.js M src/gateway/rest.js M src/preview/model.js M src/ui/renderer.js M tests/node-qunit/gateway/mediawiki.test.js M tests/node-qunit/gateway/rest.test.js M tests/node-qunit/stubs.js M tests/node-qunit/ui/renderer.test.js 10 files changed, 80 insertions(+), 58 deletions(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/403580 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib77627fb9c80d8e806208bbafcfc615b130e3278 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Niedzielski <[email protected]> Gerrit-Reviewer: Jdlrobson <[email protected]> Gerrit-Reviewer: Jhernandez <[email protected]> Gerrit-Reviewer: Niedzielski <[email protected]> Gerrit-Reviewer: Pmiazga <[email protected]> Gerrit-Reviewer: Sniedzielski <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
