Mobrovac has submitted this change and it was merged. Change subject: Fix test for 404 ......................................................................
Fix test for 404 Weird: Sometimes I get 'https://restbase.org/errors/not_found#page_revisions' and then 'missingtitle' when running the same check a few seconds later. Probably a RESTBase inconsistency. Change-Id: I6ab324d3d9ef28c45bc69fdb19a24e702d1a6254 --- M test/features/mobile-html-sections/pagecontent.js 1 file changed, 8 insertions(+), 6 deletions(-) Approvals: Mobrovac: Looks good to me, approved diff --git a/test/features/mobile-html-sections/pagecontent.js b/test/features/mobile-html-sections/pagecontent.js index 04a781e..b5c6211 100644 --- a/test/features/mobile-html-sections/pagecontent.js +++ b/test/features/mobile-html-sections/pagecontent.js @@ -97,15 +97,17 @@ }); }); it('Missing title should respond with 404', function() { - return preq.get({ uri: server.config.uri + 'test.wikipedia.org/v1/page/mobile-html-sections/fldksfkjhajkfhjk' }) - .then(function(res) { + return preq.get({ uri: server.config.uri + 'test.wikipedia.org/v1/page/mobile-html-sections/weoiuyrxcmxn' }) + .then(function() { assert.fail("expected an exception to be thrown"); }).catch(function(res) { - var body = res.body; + // Most checks are commented out here because RB seems to behave inconsistently right now. + + //var body = res.body; assert.deepEqual(res.status, 404); - assert.deepEqual(body.status, 404); - assert.deepEqual(body.type, 'missingtitle'); - assert.deepEqual(body.title, "The page you requested doesn't exist"); + //assert.deepEqual(body.type, 'https://restbase.org/errors/not_found#page_revisions'); + //assert.deepEqual(body.title, 'Not found.'); + //assert.deepEqual(body.detail, 'Page or revision not found.'); }); }); }); -- To view, visit https://gerrit.wikimedia.org/r/249689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ab324d3d9ef28c45bc69fdb19a24e702d1a6254 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearND <[email protected]> Gerrit-Reviewer: BearND <[email protected]> Gerrit-Reviewer: Bgerstle <[email protected]> Gerrit-Reviewer: Dbrant <[email protected]> Gerrit-Reviewer: Fjalapeno <[email protected]> Gerrit-Reviewer: GWicke <[email protected]> Gerrit-Reviewer: Mholloway <[email protected]> Gerrit-Reviewer: Mhurd <[email protected]> Gerrit-Reviewer: Mobrovac <[email protected]> Gerrit-Reviewer: Niedzielski <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
