[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix broken tests
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395840 ) Change subject: Fix broken tests .. Fix broken tests These tests should point at the real page and not the redirect page since we're not testing redirect handling. This fixes the build; let's figure out why they were failing later. Change-Id: If7017392c2869d6115d3cab4adea568bc791050d --- M test/features/mobile-sections-lead/pagecontent.js M test/features/mobile-sections/pagecontent-v2.js 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/test/features/mobile-sections-lead/pagecontent.js b/test/features/mobile-sections-lead/pagecontent.js index 7f093b1..9c276d4 100644 --- a/test/features/mobile-sections-lead/pagecontent.js +++ b/test/features/mobile-sections-lead/pagecontent.js @@ -212,7 +212,7 @@ }); }); it('Enwiki hatnotes are promoted to the lead object', () => { -const title = `Chivalric%20order`; +const title = `Order_of_chivalry`; const uri = `${server.config.uri}${wikiSectionsLead}${title}/699553745`; const anchor = ``; return preq.get({ uri }) diff --git a/test/features/mobile-sections/pagecontent-v2.js b/test/features/mobile-sections/pagecontent-v2.js index 439a24d..05ae604 100644 --- a/test/features/mobile-sections/pagecontent-v2.js +++ b/test/features/mobile-sections/pagecontent-v2.js @@ -33,7 +33,7 @@ // special it('Hatnotes do not appear in the lead object', () => { -const title = 'Chivalric%20order/699553745'; +const title = 'Order_of_chivalry/699553745'; const uri = `${server.config.uri}en.wikipedia.org/v1/page/formatted/${title}`; const anchor = ''; return preq.get({ uri }) -- To view, visit https://gerrit.wikimedia.org/r/395840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7017392c2869d6115d3cab4adea568bc791050d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway Gerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix broken tests
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395840 ) Change subject: Fix broken tests .. Fix broken tests These tests should point at the real page and not the redirect page since we're not testing redirect handling. This fixes the build; let's figure out why they were failing later. Change-Id: If7017392c2869d6115d3cab4adea568bc791050d --- M test/features/mobile-sections-lead/pagecontent.js M test/features/mobile-sections/pagecontent-v2.js 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/40/395840/1 diff --git a/test/features/mobile-sections-lead/pagecontent.js b/test/features/mobile-sections-lead/pagecontent.js index 7f093b1..a5ec47a 100644 --- a/test/features/mobile-sections-lead/pagecontent.js +++ b/test/features/mobile-sections-lead/pagecontent.js @@ -212,7 +212,7 @@ }); }); it('Enwiki hatnotes are promoted to the lead object', () => { -const title = `Chivalric%20order`; +const title = `Order%20of%20chivalry`; const uri = `${server.config.uri}${wikiSectionsLead}${title}/699553745`; const anchor = ``; return preq.get({ uri }) diff --git a/test/features/mobile-sections/pagecontent-v2.js b/test/features/mobile-sections/pagecontent-v2.js index 439a24d..d8a0ae5 100644 --- a/test/features/mobile-sections/pagecontent-v2.js +++ b/test/features/mobile-sections/pagecontent-v2.js @@ -33,7 +33,7 @@ // special it('Hatnotes do not appear in the lead object', () => { -const title = 'Chivalric%20order/699553745'; +const title = 'Order%20of%20chivalry/699553745'; const uri = `${server.config.uri}en.wikipedia.org/v1/page/formatted/${title}`; const anchor = ''; return preq.get({ uri }) -- To view, visit https://gerrit.wikimedia.org/r/395840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7017392c2869d6115d3cab4adea568bc791050d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix broken tests
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370513 ) Change subject: Fix broken tests .. Fix broken tests 1) Reflect template change: Link has changed from Help:IPA for English to Help:IPA/English https://en.m.wikipedia.org/wiki/Special:MobileDiff/794002013 2) The action API doesn't return a Wikidata description for Main Pages. See T172829 Bug: T172829 Change-Id: I91a840fa0d6e6fe5a57a235285dc4bbdf5297929 --- M spec.yaml M test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json M test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section3-text.html M test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json M test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section3-text.html M test/features/mobile-sections/pagecontent.js 6 files changed, 4 insertions(+), 6 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified Jdlrobson: Looks good to me, but someone else must approve diff --git a/spec.yaml b/spec.yaml index 6bb3913..164553d 100644 --- a/spec.yaml +++ b/spec.yaml @@ -630,7 +630,6 @@ displaytitle: /.+/ normalizedtitle: /.+/ wikibase_item: Q5296 -description: /[Mm]ain [Pp]age/ protection: /.+/ editable: /.+/ mainpage: true diff --git "a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" "b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" index d80bea7..b9d2c8d 100644 --- "a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" +++ "b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" @@ -36,7 +36,7 @@ }, { "id": 3, -"text": "\nKonjac (English: /ˈkoʊnjæk/ KOHN-yak)\n\n", +"text": "\nKonjac (English: /ˈkoʊnjæk/ KOHN-yak)\n\n", "toclevel": 1, "line": "Pronunciation aids", "anchor": "Pronunciation_aids" diff --git "a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section3-text.html" "b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section3-text.html" index a6db74f..bb4dfad 100644 --- "a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section3-text.html" +++ "b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section3-text.html" @@ -1,5 +1,5 @@ - Konjac (English: /ˈkoʊnjæk/ + Konjac (English: /ˈkoʊnjæk/ KOHN-yak) diff --git "a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" "b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" index 7676792..244222d 100644 --- "a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" +++ "b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" @@ -190,7 +190,7 @@ }, { "id": 3, -"text": "\nKonjac (English: /ˈkoʊnjæk/ KOHN-yak)\n\n", +"text": "\nKonjac (English: /ˈkoʊnjæk/ KOHN-yak)\n\n", "toclevel": 1, "line": "Pronunciation aids", "anchor": "Pronunciation_aids" diff --git "a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section3-text.html" "b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section3-text.html" index 684cf49..8887298 100644 --- "a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section3-text.html" +++ "b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section3-text.html" @@ -1,5 +1,5 @@ - Konjac (English: /ˈkoʊnjæk/ + Konjac (English: /ˈkoʊnjæk/ KOHN-yak) diff --git a/test/features/mobile-sections/pagecontent.js b/test/features/mobile-sections/pagecontent.js index 01f9c07..dc072f4 100644 --- a/test/features/mobile-sections/pagecontent.js +++ b/test/features/mobile-sections/pagecontent.js @@ -67,7 +67,6 @@ assert.equal(lead.displaytitle, 'Main Page'); assert.equal(lead.normalizedtitle, 'Main Page'); assert.equal(lead.wikibase_item, 'Q5296'); -assert.ok(/main page/i.test(lead.description)); assert.deepEqual(lead.protection, { "edit": [ "sysop" -- To view, visit https://g
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix broken tests (do not skip)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/368520 ) Change subject: Fix broken tests (do not skip) .. Fix broken tests (do not skip) Skipping should only be used as a short term measure. It's an anti-pattern - if tests are broken they should be either fixed promptly or removed. They may be masking real bugs that deserve debugging attention. Since articles are living breathing documents these integration tests should be run against the revisions they were written against where possible. This updates all queries to pass a known safe revision to test against where this fixes the problem "Page with IPA content" is not related to T170325 so is fixed. Where a test is being skipped because of an upstream problem mark it with the bug number. Change-Id: I6afd85f0f82df7d40ea7f84d0fa49a4fb6f3f94e --- M test/features/mobile-sections-lead/pagecontent.js M test/features/mobile-sections/pagecontent-v2.js M test/features/mobile-sections/pagecontent.js 3 files changed, 14 insertions(+), 9 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/test/features/mobile-sections-lead/pagecontent.js b/test/features/mobile-sections-lead/pagecontent.js index 827baf2..f0b962f 100644 --- a/test/features/mobile-sections-lead/pagecontent.js +++ b/test/features/mobile-sections-lead/pagecontent.js @@ -5,6 +5,8 @@ const server = require('../../utils/server.js'); const headers = require('../../utils/headers.js'); +const wikiSectionsLead = 'en.wikipedia.org/v1/page/mobile-sections-lead/'; + describe('mobile-sections-lead', function() { this.timeout(2); // eslint-disable-line no-invalid-this @@ -118,7 +120,7 @@ assert.deepEqual(lead.geo.longitude, 28.88305556); }); }); -// TODO: FIX OR REMOVE +// T152441 it.skip('Wikivoyage en Paris should have a lead object with a geo property', () => { const uri = `${server.config.uri}en.wikivoyage.org/v1/page/mobile-sections-lead/Paris`; return preq.get({ uri }) @@ -208,9 +210,9 @@ Actual text ${res.body.sections[0].text}`); }); }); -it.skip('Enwiki hatnotes are promoted to the lead object', () => { +it('Enwiki hatnotes are promoted to the lead object', () => { const title = `Chivalric%20order`; -const uri = `${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/${title}`; +const uri = `${server.config.uri}${wikiSectionsLead}${title}/699553745`; const anchor = ``; return preq.get({ uri }) .then((res) => { diff --git a/test/features/mobile-sections/pagecontent-v2.js b/test/features/mobile-sections/pagecontent-v2.js index 5194690..1a1e9a6 100644 --- a/test/features/mobile-sections/pagecontent-v2.js +++ b/test/features/mobile-sections/pagecontent-v2.js @@ -41,8 +41,9 @@ }); }); -it.skip('Hatnotes do not appear in the lead object', () => { -const uri = `${server.config.uri}en.wikipedia.org/v1/page/formatted/Chivalric%20order`; +it('Hatnotes do not appear in the lead object', () => { +const title = 'Chivalric%20order/699553745'; +const uri = `${server.config.uri}en.wikipedia.org/v1/page/formatted/${title}`; const anchor = ''; return preq.get({ uri }) .then((res) => { @@ -133,12 +134,14 @@ }); }); -it.skip('Page with IPA content', () => { -const uri = `${server.config.uri}en.wikipedia.org/v1/page/formatted/Sunderland_A.F.C.`; +it('Page with IPA content', () => { +const title = 'Sunderland_A.F.C.'; +const uri = `${server.config.uri}en.wikipedia.org/v1/page/formatted/${title}`; return preq.get({ uri }) .then((res) => { const text = res.body.lead.intro; -const regex = //; +const regex = //; // eslint-disable-line max-len + assert.ok(regex.test(text), res.body.lead.intro); }); }); diff --git a/test/features/mobile-sections/pagecontent.js b/test/features/mobile-sections/pagecontent.js index 933a8c9..9ed4c59 100644 --- a/test/features/mobile-sections/pagecontent.js +++ b/test/features/mobile-sections/pagecontent.js @@ -334,7 +334,7 @@ }); it.skip('Page with IPA content', () => { -const title = 'Sunderland_A.F.C.'; +const title = 'Sunderland_A.F.C./738562635'; const uri = `${server.config.uri}en.wikipedia.org/v1/page/mobile-sections/${title}`; return preq.get({ uri }) .then((res) => { -- To view, visit https://gerrit.wikimedia.org/r/368520 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6afd85f0f82df7d40ea7f84d0fa49a4fb6f3f94e Gerrit-PatchSet: 8 Gerrit-Project: mediawiki/services
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix broken tests (do not skip)
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/368520 ) Change subject: Fix broken tests (do not skip) .. Fix broken tests (do not skip) Skipping should only be used as a short term measure. It's an anti-pattern - if tests are broken they should be either fixed promptly or removed. They may be masking real bugs that deserve debugging attention. Since articles are living breathing documents these integration tests should be run against the revisions they were written against where possible. This updates all queries to pass a known safe revision to test against where this fixes the problem "Page with IPA content" test is broken due to a change in the underlying content. Let's fix that. Where a test is being skipped because of an upstream problem mark it with the bug number. Change-Id: I6afd85f0f82df7d40ea7f84d0fa49a4fb6f3f94e --- M test/features/mobile-sections-lead/pagecontent.js M test/features/mobile-sections/pagecontent-v2.js M test/features/mobile-sections/pagecontent.js 3 files changed, 21 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/20/368520/1 diff --git a/test/features/mobile-sections-lead/pagecontent.js b/test/features/mobile-sections-lead/pagecontent.js index 95a612f..f0a1f9d 100644 --- a/test/features/mobile-sections-lead/pagecontent.js +++ b/test/features/mobile-sections-lead/pagecontent.js @@ -5,6 +5,9 @@ const server = require('../../utils/server.js'); const headers = require('../../utils/headers.js'); +const wikivoyageSectionsLead = 'en.wikivoyage.org/v1/page/mobile-sections-lead/'; +const wikiSectionsLead = 'en.wikipedia.org/v1/page/mobile-sections-lead/'; + describe('mobile-sections-lead', function() { this.timeout(2); // eslint-disable-line no-invalid-this @@ -118,9 +121,9 @@ assert.deepEqual(lead.geo.longitude, 28.88305556); }); }); -// TODO: FIX OR REMOVE -it.skip('Wikivoyage en Paris should have a lead object with a geo property', () => { -const uri = `${server.config.uri}en.wikivoyage.org/v1/page/mobile-sections-lead/Paris`; +it('Wikivoyage en Paris should have a lead object with a geo property', () => { +const rev = 3092864; +const uri = `${server.config.uri}${wikivoyageSectionsLead}Paris/${rev}`; return preq.get({ uri }) .then((res) => { const lead = res.body; @@ -136,6 +139,7 @@ assert.ok(!{}.hasOwnProperty.call(lead, 'geo')); }); }); +// T170325 it.skip('Barack Obama should have a pronunciation', () => { const title = 'Barack_Obama'; const uri = `${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/${title}`; @@ -156,6 +160,7 @@ 'The infobox has not been removed for backwards compatibility.'); }); }); +// T170325 it.skip('Enwiki Uranus loads successfully (no pronunciation parsing TypeErrors)', () => { const uri = `${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/Uranus`; const exp = '//upload.wikimedia.org/wikipedia/commons/1/1c/En-us-Uranus.ogg'; @@ -166,6 +171,7 @@ assert.deepEqual(lead.pronunciation.url, exp); }); }); +// T170325 it.skip('Enwiki Odisha loads successfully (no pronunciation parsing TypeErrors)', () => { const uri = `${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/Odisha`; const path = `//upload.wikimedia.org/wikipedia/commons/c/c2`; @@ -177,6 +183,7 @@ assert.deepEqual(lead.pronunciation.url, exp); }); }); +// T170325 it.skip('Enwiki Yazidis loads successfully (no pronunciation parsing TypeErrors)', () => { const uri = `${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/Yazidis`; const path = `//upload.wikimedia.org/wikipedia/commons/8/8d`; @@ -208,9 +215,9 @@ Actual text ${res.body.sections[0].text}`); }); }); -it.skip('Enwiki hatnotes are promoted to the lead object', () => { +it('Enwiki hatnotes are promoted to the lead object', () => { const title = `Chivalric%20order`; -const uri = `${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/${title}`; +const uri = `${server.config.uri}${wikiSectionsLead}${title}/699553745`; const anchor = ``; return preq.get({ uri }) .then((res) => { diff --git a/test/features/mobile-sections/pagecontent-v2.js b/test/features/mobile-sections/pagecontent-v2.js index 5194690..0fbcb63 100644 --- a/test/features/mobile-sections/pagecontent-v2.js +++ b/test/features/mobile-sections/pagecontent-v2.js @@ -41,8 +41,9 @@ }); }); -it.skip('Hatnotes do not appear