Page MenuHomePhabricator

Use eslint-config-wikimedia 0.17.x in all repositories with Selenium tests
Open, Needs TriagePublic

Description

TODO

Notes

eslint-config-wikimedia 0.17.x simplified eslint configuration for Selenium tests.

Update eslint-config-wikimedia version to 0.17.x in all repositories with Selenium tests. Also, replace contents of tests/selenium/.eslintrc.json file.

Example old file from mediawiki/core repository.

{
	"root": true,
	"extends": [
		"wikimedia",
		"wikimedia/node",
		"wikimedia/language/es2017",
		"wikimedia/jquery"
	],
	"env": {
		"mocha": true
	},
	"globals": {
		"browser": "readonly",
		"mw": "readonly"
	},
	"rules": {
		"no-jquery/no-global-selector": "off"
	}
}

Example new file:

{
	"root": true,
	"extends": [
		"wikimedia/selenium"
	]
}
RepositoryPatch
mediawiki/core596468
mediawiki/extensions/AbuseFilter602836
mediawiki/extensions/AdvancedSearch604842
mediawiki/extensions/CirrusSearch605358
mediawiki/extensions/Cite603952
mediawiki/extensions/ContentTranslation603959
mediawiki/extensions/Echo605331
mediawiki/extensions/ElectronPdfService605156
mediawiki/extensions/EntitySchema607653
mediawiki/extensions/FileImporter606381
mediawiki/extensions/GrowthExperiments607099
mediawiki/extensions/Math605936
mediawiki/extensions/MobileFrontend601860
mediawiki/extensions/Newsletter607006
mediawiki/extensions/ORES607121
mediawiki/extensions/Popups607129
mediawiki/extensions/ProofreadPage607003
mediawiki/extensions/RelatedArticles607351
mediawiki/extensions/RevisionSlider605925
mediawiki/extensions/TemplateWizard607005
mediawiki/extensions/TwoColConflict605182
mediawiki/extensions/Wikibase614765 693439
mediawiki/extensions/WikibaseLexeme606274
mediawiki/extensions/WikibaseMediaInfo607359
mediawiki/skins/MinervaNeue601864
phab-deployment616183
wikibase/termboxT265656

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 602836 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] eslint: Update to eslint-config-wikimedia 0.16.0

https://gerrit.wikimedia.org/r/602836

Change 604842 had a related patch set uploaded (by Jared Blumer; owner: Jared Blumer):
[mediawiki/extensions/AdvancedSearch@master] eslint: Update to eslint-config-wikimedia 0.16.0

https://gerrit.wikimedia.org/r/604842

Change 605247 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[integration/config@master] zuul: Add Jared G. Blumer to trusted users

https://gerrit.wikimedia.org/r/605247

Change 604842 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] eslint: Update to eslint-config-wikimedia 0.16.0

https://gerrit.wikimedia.org/r/604842

Change 605247 merged by jenkins-bot:
[integration/config@master] zuul: Add Jared G. Blumer to trusted users

https://gerrit.wikimedia.org/r/605247

Change 605358 had a related patch set uploaded (by Jared Blumer; owner: Jared Blumer):
[mediawiki/extensions/CirrusSearch@master] eslint: Update to eslint-config-wikimedia 0.16.0

https://gerrit.wikimedia.org/r/605358

zeljkofilipin renamed this task from Use eslint-config-wikimedia 0.16.0 in all repositories with Selenium tests to Use eslint-config-wikimedia 0.16.1 in all repositories with Selenium tests.Jun 19 2020, 9:58 AM
zeljkofilipin updated the task description. (Show Details)
zeljkofilipin updated the task description. (Show Details)

Change 605358 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] eslint: Update to eslint-config-wikimedia 0.16.1

https://gerrit.wikimedia.org/r/605358

zeljkofilipin renamed this task from Use eslint-config-wikimedia 0.16.1 in all repositories with Selenium tests to Use eslint-config-wikimedia 0.16.x in all repositories with Selenium tests.Jun 24 2020, 12:51 PM
zeljkofilipin updated the task description. (Show Details)

Change 607653 had a related patch set uploaded (by Jared Blumer; owner: Jared Blumer):
[mediawiki/extensions/EntitySchema@master] eslint: Update to eslint-config-wikimedia 0.16.2

https://gerrit.wikimedia.org/r/607653

Change 607653 merged by jenkins-bot:
[mediawiki/extensions/EntitySchema@master] eslint: Update to eslint-config-wikimedia 0.16.2

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/EntitySchema/ /607653

Change 614765 had a related patch set uploaded (by Jared Blumer; owner: Jared Blumer):
[mediawiki/extensions/Wikibase@master] eslint: update selenium .estlintrc.json

https://gerrit.wikimedia.org/r/614765

Change 614765 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] eslint: update selenium .estlintrc.json

https://gerrit.wikimedia.org/r/614765

Change 616183 had a related patch set uploaded (by Jared Blumer; owner: Jared Blumer):
[phabricator/deployment@wmf/stable] eslint: Update to eslint-config-wikimedia 0.16.0 and eslint 7.5.0

https://gerrit.wikimedia.org/r/616183

Change 616183 merged by 20after4:
[phabricator/deployment@wmf/stable] eslint: Update to eslint-config-wikimedia 0.16.0 and eslint 7.5.0

https://gerrit.wikimedia.org/r/616183

Change 619079 had a related patch set uploaded (by Jared Blumer; owner: Jared Blumer):
[wikimedia/portals/deploy@master] eslint: Update to eslint-config-wikimedia 0.16.2

https://gerrit.wikimedia.org/r/619079

Change 619079 merged by jenkins-bot:
[wikimedia/portals/deploy@master] eslint: Update to eslint-config-wikimedia 0.16.2

https://gerrit.wikimedia.org/r/619079

@jaredblumer do you need help with the remaining two repositories?

@jaredblumer do you need help with the remaining two repositories?

@zeljkofilipin I will be working on this this weekend and will follow the steps we discussed. Sorry for the delay on these last two!

@jaredblumer take your time, I just wanted to make check if you need help. 😁

@jaredblumer I've just noticed that you didn't have the volunteer badge. Well, now you have! 🏅 (I'm not sure if Phabricator sends e-mail notification for that.)

https://phabricator.wikimedia.org/people/badges/25156/

@zeljkofilipin wikidata/query/gui does not use eslint-config-wikimedia as a dependency and does not have a .eslintrc.json file. It does, however, have one test (included below). Should this be repo be removed from the task or should I add the dependency and eslintrc.json file?

/* jshint strict: false */
/* globals require, describe, it, browser, $ */
var assert = require( 'assert' );

describe( 'embed.html', function() {
	it( 'loads results for query', function() {
		var query =
			'SELECT ?item ?itemLabel ?other WHERE { '
			+ ' VALUES (?item ?itemLabel ?other) { '
			+ '     (wd:Q42 "Douglas Adams"@en "1952-03-11T00:00:00Z"^^xsd:dateTime) '
			+ '     (wd:Q80 "Tim Berners-Lee"@de <http://commons.wikimedia.org/wiki/Special:FilePath/Sir%20Tim%20Berners-Lee%20%28cropped%29.jpg>)'
			+ ' } }';

		return browser.url( browser.options.baseUrl + '/embed.html#' + encodeURI( query ) )
			.then( function() {
				return $( '#query-result' );
			} ).then( function( element ) {
				return element.isExisting();
			} ).then( function( isExisting ) {
				assert( isExisting );
			} );
	} );
} );
zeljkofilipin renamed this task from Use eslint-config-wikimedia 0.16.x in all repositories with Selenium tests to Use eslint-config-wikimedia 0.17.x in all repositories with Selenium tests.Sep 28 2020, 3:26 PM
zeljkofilipin updated the task description. (Show Details)
zeljkofilipin moved this task from Recurring ♻️ to Backlog 🪒 on the User-zeljkofilipin board.
zeljkofilipin added a subscriber: jaredblumer.

Change 693439 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/extensions/Wikibase@master] WIP eslint: Update eslint-config-wikimedia

https://gerrit.wikimedia.org/r/693439

Change 693439 abandoned by Zfilipin:

[mediawiki/extensions/Wikibase@master] WIP eslint: Update eslint-config-wikimedia

Reason:

https://gerrit.wikimedia.org/r/693439

zeljkofilipin updated the task description. (Show Details)
zeljkofilipin moved this task from Deep work 🌊 to Backlog 🪒 on the User-zeljkofilipin board.

Note that wikimedia/portals/deploy selenium tests got entirely broken after https://gerrit.wikimedia.org/r/c/wikimedia/portals/deploy/+/619079 cause it added some extra it when the test helper already returned it. Fixed by https://gerrit.wikimedia.org/r/c/wikimedia/portals/deploy/+/701087

zeljkofilipin raised the priority of this task from Medium to Needs Triage.Sep 17 2021, 9:30 AM