Mobrovac has submitted this change and it was merged. Change subject: Update spec and tests for newly added lead section fields ......................................................................
Update spec and tests for newly added lead section fields Follow-up from https://gerrit.wikimedia.org/r/#/c/235678/ Bug: T111407 Change-Id: Ie29629b87d0ba869fd618ddb0716c847c2ca9ddb --- M spec.yaml M test/features/mobile-html-sections/pagecontent.js 2 files changed, 8 insertions(+), 1 deletion(-) Approvals: Mobrovac: Looks good to me, approved diff --git a/spec.yaml b/spec.yaml index 975d44c..8a4479e 100644 --- a/spec.yaml +++ b/spec.yaml @@ -96,6 +96,7 @@ revision: /.+/ lastmodified: /.+/ displaytitle: /.+/ + normalizedtitle: /.+/ description: main page of a Wikimedia project protection: /.+/ editable: /.+/ @@ -127,6 +128,7 @@ revision: /.+/ lastmodified: /.+/ displaytitle: /.+/ + normalizedtitle: /.+/ description: main page of a Wikimedia project protection: /.+/ editable: /.+/ @@ -148,6 +150,7 @@ revision: /.+/ lastmodified: /.+/ displaytitle: /.+/ + normalizedtitle: /.+/ description: /.+/ protection: /.+/ editable: /.+/ @@ -173,6 +176,7 @@ revision: /.+/ lastmodified: /.+/ displaytitle: /.+/ + normalizedtitle: /.+/ description: /.+/ protection: /.+/ editable: /.+/ diff --git a/test/features/mobile-html-sections/pagecontent.js b/test/features/mobile-html-sections/pagecontent.js index 42947aa..709bffb 100644 --- a/test/features/mobile-html-sections/pagecontent.js +++ b/test/features/mobile-html-sections/pagecontent.js @@ -38,6 +38,7 @@ assert.deepEqual(res.status, 200); assert.ok(lead.lastmodified.startsWith('201'), lead.lastmodified + ' should start with 201'); // 2015- assert.deepEqual(lead.displaytitle, 'Main Page'); + assert.deepEqual(lead.normalizedtitle, 'Main Page'); assert.deepEqual(lead.description, 'main page of a Wikimedia project'); assert.deepEqual(lead.protection, { "edit": [ @@ -57,7 +58,7 @@ assert.ok(lead.media.items.length > 0, 'Expected at least one media item'); }); }); - it('Obama (redirect) should have a lead image and many media items', function() { + it('Obama (redirect) should have a lead image, expected properties, and many media items', function() { return preq.get({ uri: server.config.uri + 'en.wikipedia.org/v1/page/mobile-html-sections/Obama' }) .then(function(res) { var lead = res.body.lead; @@ -70,6 +71,8 @@ assert.contains(lead.image.urls["1024"], "//upload.wikimedia.org/wikipedia/commons/thumb"); assert.contains(lead.image.urls["1024"], "1024px-"); + assert.deepEqual(lead.description, "44th President of the United States"); + assert.deepEqual(lead.redirected, "Barack Obama"); assert.ok(lead.media.items.length > 3, 'Expected many media items'); var remaining = res.body.remaining; -- To view, visit https://gerrit.wikimedia.org/r/236048 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie29629b87d0ba869fd618ddb0716c847c2ca9ddb Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway <[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
