Page MenuHomePhabricator

Refactor AdvancedSearch browser tests which use nodemw module
Closed, ResolvedPublic3 Story Points


AdvancedSearch browser tests started failing after module nodemw was removed from mediawiki core. The new module to be used is mwbot.
Related task T181284

  • Module nodemw is replaced with mwbot in all relevant files.
  • Browser tests pass.

Event Timeline

Restricted Application added a project: TCB-Team. · View Herald TranscriptMar 22 2018, 4:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tonina_Zhelyazkova_WMDE set the point value for this task to 3.

@zeljkofilipin replacing nodemw with mwbot has been somewhat successful.
One failing test is left. It's because of 'badtoken' error upon calling request function from mwbot module.
So far no idea why this happens. We're using the same syntax as in
This is the part of the code that fails:

return client.login( {
			username: browser.options.username,
			password: browser.options.password,
			apiUrl: browser.options.baseUrl + '/api.php'
		} ).then( () => {
			let searchNamespaces = namespaceIds.reduce( ( acc, id ) => {
				acc[ 'searchNs' + id ] = true;
				return acc;
			}, {} );
			return client.request( {
				action: 'options',
				change: searchNamespaces,
				token: client.editToken
			} ).then( () => {
				// success
			} ).catch( ( err ) => {
				log( err );
			} );
		} ).catch( ( err ) => {
			log( err );
                } );

Could you take a look on gerrit? Any ideas/help would be highly appreciated.

zeljkofilipin renamed this task from Refactor browser tests which use nodemw module to Refactor AdvancedSearch browser tests which use nodemw module.Mar 26 2018, 12:11 PM
zeljkofilipin triaged this task as Medium priority.

@EBernhardson, @dcausse and @Jdrewniak have some mwbot 🤖 experience, they might be able to help. I will take a look, but I am still blocked on not being able to set up AdvancedSearch in mediawiki-vagrant. 😢

We managed to resolve the issue. The tests now pass using mwbot.

Can this be resolved, since 421535 is merged?

Lea_WMDE closed this task as Resolved.Apr 4 2018, 2:00 PM