jenkins-bot has submitted this change and it was merged.
Change subject: Test summary endpoint against a lesser edited page
......................................................................
Test summary endpoint against a lesser edited page
The opening text of 'Cat' is frequently changed (often frivolously) which
breaks our summary endpoint test with a false negative.
For a little more stability, instead let's test against the article Ann
Arbor Charter Township, Michigan (last edited July 5, 2015).
I've also removed the infobox output tests since the summary endpoint
in production doesn't include infoboxes.
Change-Id: Ib37b6e71f914a810518266dc32eea94985406b5a
---
M test/features/mobile-summary/pagecontent.js
1 file changed, 5 insertions(+), 8 deletions(-)
Approvals:
BearND: Looks good to me, approved
jenkins-bot: Verified
diff --git a/test/features/mobile-summary/pagecontent.js
b/test/features/mobile-summary/pagecontent.js
index 9d62d8a..b5ac8cc 100644
--- a/test/features/mobile-summary/pagecontent.js
+++ b/test/features/mobile-summary/pagecontent.js
@@ -17,19 +17,16 @@
return headers.checkHeaders(server.config.uri +
'en.wikipedia.org/v1/page/mobile-summary/Foobar',
'application/json');
});
- it('en Cat page should have expected properties', function() {
- return preq.get({ uri: server.config.uri +
'en.wikipedia.org/v1/page/mobile-summary/Cat' })
+ it('Page should have expected properties', function() {
+ return preq.get({ uri: server.config.uri +
'en.wikipedia.org/v1/page/mobile-summary/Ann_Arbor_Charter_Township,_Michigan'
})
.then(function(res) {
var body = res.body;
assert.deepEqual(res.status, 200);
- assert.deepEqual(body.title, 'Cat');
- assert.ok(body.extract.indexOf('The domestic cat is a') === 0,
'Expected different start of extract');
+ assert.deepEqual(body.title, 'Ann Arbor Charter Township,
Michigan');
+ assert.ok(body.extract.indexOf('Ann Arbor Charter Township is
a charter township') === 0, 'Expected different start of extract');
assert.deepEqual(body.thumbnail, {
- "source":
"https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Cat_poster_1.jpg/320px-Cat_poster_1.jpg"
+ "source":
"https://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Ann_Arbor_Township_hall_and_fire_station.JPG/320px-Ann_Arbor_Township_hall_and_fire_station.JPG"
});
- assert.ok(body.infobox.length > 0, 'Expected at least one
infobox row');
- assert.ok(body.infobox[0].length > 0, 'Expected at least one
infobox column');
- assert.ok(body.infobox[0][0].indexOf('Domestic cat<s') === 0);
});
});
});
--
To view, visit https://gerrit.wikimedia.org/r/271433
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib37b6e71f914a810518266dc32eea94985406b5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Dbrant <[email protected]>
Gerrit-Reviewer: Fjalapeno <[email protected]>
Gerrit-Reviewer: GWicke <[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