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(20000); // eslint-disable-line no-invalid-this
@@ -118,7 +120,7 @@
                 assert.deepEqual(lead.geo.longitude, 28.883055555556);
             });
     });
-    // 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 = `<a href="/wiki/Military_order_(society)" 
title="Military order (society)">`;
         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 = '<a href="/wiki/Military_order_(society)" 
title="Military order (society)">';
         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 = /<span class="nowrap mcs-ipa"><span 
class="noexcerpt">/;
+                const regex = /<span class="nowrap mcs-ipa"><span class="IPA 
nopopups noexcerpt">/; // 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/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: BearND <bsitzm...@wikimedia.org>
Gerrit-Reviewer: Dbrant <dbr...@wikimedia.org>
Gerrit-Reviewer: Fjalapeno <cfl...@wikimedia.org>
Gerrit-Reviewer: GWicke <gwi...@wikimedia.org>
Gerrit-Reviewer: Jhernandez <jhernan...@wikimedia.org>
Gerrit-Reviewer: Mholloway <mhollo...@wikimedia.org>
Gerrit-Reviewer: Mhurd <mh...@wikimedia.org>
Gerrit-Reviewer: Mobrovac <mobro...@wikimedia.org>
Gerrit-Reviewer: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: Ppchelko <ppche...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to