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",
"wdio-cucumber-framework": "1.1.1",
"wdio-mocha-framework": "0.5.13",
"wdio-mediawiki": "0.2.0",
"wdio-mediawiki": "0.3.0",
"wdio-spec-reporter": "0.1.4",
"webdriverio": "4.13.1"
}

View File

@ -1,4 +1,5 @@
const { api, ArticlePage } = require( '../support/world' );
const RunJobs = require( 'wdio-mediawiki/RunJobs' );
const Api = require( 'wdio-mediawiki/Api' );
const Page = require( 'wdio-mediawiki/Page' );
const {
@ -33,9 +34,15 @@ const iAmInAWikiThatHasCategories = ( title ) => {
// A pause is necessary to let the categories register with database before trying to use
// them in an article
waitForPropagation( 5000 );
Api.edit( title, wikitext );
// categories are handled by a JobRunner so need extra time to appear via API calls!
waitForPropagation( 5000 );
browser.call( () => {
return Api.edit( title, wikitext );
} );
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 ) {

View File

@ -33,14 +33,6 @@ describe( 'Categories', function () {
// Then I should see the categories overlay
iShouldSeeTheCategoriesOverlay();
// FIXME: This check is partially skipped as there is no way to lower $wgJobRunRate
// 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?' );
}
iShouldSeeAListOfCategories();
} );
} );