Merge "Restore category step for CI"

This commit is contained in:
jenkins-bot 2019-05-01 18:25:17 +00:00 committed by Gerrit Code Review
commit 2027ce6a63
3 changed files with 12 additions and 13 deletions

View file

@ -24,7 +24,7 @@
"svgo": "0.7.2", "svgo": "0.7.2",
"wdio-cucumber-framework": "1.1.1", "wdio-cucumber-framework": "1.1.1",
"wdio-mocha-framework": "0.5.13", "wdio-mocha-framework": "0.5.13",
"wdio-mediawiki": "0.2.0", "wdio-mediawiki": "0.3.0",
"wdio-spec-reporter": "0.1.4", "wdio-spec-reporter": "0.1.4",
"webdriverio": "4.13.1" "webdriverio": "4.13.1"
} }

View file

@ -1,4 +1,5 @@
const { api, ArticlePage } = require( '../support/world' ); const { api, ArticlePage } = require( '../support/world' );
const RunJobs = require( 'wdio-mediawiki/RunJobs' );
const Api = require( 'wdio-mediawiki/Api' ); const Api = require( 'wdio-mediawiki/Api' );
const Page = require( 'wdio-mediawiki/Page' ); const Page = require( 'wdio-mediawiki/Page' );
const { const {
@ -33,9 +34,15 @@ const iAmInAWikiThatHasCategories = ( title ) => {
// A pause is necessary to let the categories register with database before trying to use // A pause is necessary to let the categories register with database before trying to use
// them in an article // them in an article
waitForPropagation( 5000 ); waitForPropagation( 5000 );
Api.edit( title, wikitext ); browser.call( () => {
// categories are handled by a JobRunner so need extra time to appear via API calls! return Api.edit( title, wikitext );
waitForPropagation( 5000 ); } );
browser.call( () => {
// The category overlay uses the category API
// which will only return results if the job queue has completed.
// Run before continuing!
return RunJobs.run();
} );
}; };
const iAmOnAPageThatHasTheFollowingEdits = function ( table ) { const iAmOnAPageThatHasTheFollowingEdits = function ( table ) {

View file

@ -33,14 +33,6 @@ describe( 'Categories', function () {
// Then I should see the categories overlay // Then I should see the categories overlay
iShouldSeeTheCategoriesOverlay(); iShouldSeeTheCategoriesOverlay();
// FIXME: This check is partially skipped as there is no way to lower $wgJobRunRate iShouldSeeAListOfCategories();
// See: T199939#5095838
try {
iShouldSeeAListOfCategories();
} catch ( e ) {
// pass.
// eslint-disable-next-line no-console
console.warn( 'Unable to check the list of the categories. Is wgJobRunRate set correctly?' );
}
} ); } );
} ); } );