mediawiki-skins-MinervaNeue/resources/skins.minerva.scripts
Timo Tijhof 548e94da98 tests: Adopt private require() for skins.minerva.scripts
Added to MediaWiki core last year with I9fca9fdf9b7623b1.

This fixes a confusing assertion in page-issues/index.test.js,
where for "insertBannersOrNotice()" it was asserting that the HTML
contain "⧼skin-minerva-issue-learn-more⧽", where the ⧼ character
indicates the message is not found (i.e. an error).

The test had to be written this way in order to pass, because
the skins.minerva.scripts module was not actually loaded, and thus
its templates and messages are not present either. This lack was
filled in by index.js for mw.templates, but not mw.messages.

By adopting private require(), these workarounds can all be removed.

== Motivation ==

In change I3a4024ccf90e505581, I'm working on improving the testrunner
config to enforce uselang=qqx on all tests. This is passing except
for GrowthExperiments and Minerva, both of which have the above
workarounds in place that caused a message to be undefined, and then
kept in the assertion expectation. When using uselang=qqx, values are
returned as (key) instead of ⧼key⧽, which exposes these message
existence errors.

By removing this workaround, the test will simply import the module
in the test as normal, thus the messages will exist, and thus it
will expect (key), and thus it will continue to pass even after
enforcing uselang=qqx.

Change-Id: Ib68f45d93a7054ed8bd35fc5644e2852f2f90248
2024-08-23 19:04:36 +00:00
..
page-issues build: Updating npm dependencies 2024-08-01 15:27:33 +01:00
AB.js JSDoc: fix double @ignore 2024-07-01 17:15:29 +00:00
addPortletLink.js build: Updating npm dependencies 2024-08-01 15:27:33 +01:00
ctaDrawers.js Hooks: change wikipedia is made for you warning to a notice message 2024-08-01 13:22:36 +02:00
downloadPageAction.js build: Update jsdoc-wmf-theme to 1.1.0 2024-06-28 12:38:54 -07:00
drawers.js build: Updating npm dependencies 2024-08-01 15:27:33 +01:00
initMobile.js Prefer arrow callbacks (ESLint autofix) 2024-06-04 08:01:54 -07:00
menu.js build: Updating npm dependencies 2024-08-01 15:27:33 +01:00
mobileRedirect.js Use eslint rule "no-var": "error" and replace all var 2024-03-29 07:40:22 +00:00
preInit.js Use eslint rule "no-var": "error" and replace all var 2024-03-29 07:40:22 +00:00
references.js Prefer arrow callbacks (ESLint autofix) 2024-06-04 08:01:54 -07:00
reportIfNightModeWasDisabledOnPage.js build: Update jsdoc-wmf-theme to 1.1.0 2024-06-28 12:38:54 -07:00
search.js Prefer arrow callbacks (ESLint autofix) 2024-06-04 08:01:54 -07:00
searchSuggestReveal.js Prefer arrow callbacks (ESLint autofix) 2024-06-04 08:01:54 -07:00
setup.js tests: Adopt private require() for skins.minerva.scripts 2024-08-23 19:04:36 +00:00
styles.less Fix inverted text in (recently) last modified bar 2024-05-17 14:15:39 -07:00
TabScroll.js build: Updating npm dependencies 2024-08-01 15:27:33 +01:00
TitleUtil.js build: Updating npm dependencies 2024-08-01 15:27:33 +01:00
toc.less Fix toc arrow icon being too big 2023-08-03 18:43:41 +00:00
Toolbar.js build: Update jsdoc-wmf-theme to 1.1.0 2024-06-28 12:38:54 -07:00
Toolbar.less (Almost) no more CSS variables in minerva 2024-06-11 11:44:47 -07:00
UriUtil.js build: Update jsdoc-wmf-theme to 1.1.0 2024-06-28 12:38:54 -07:00
watchstar.js build: Update jsdoc-wmf-theme to 1.1.0 2024-06-28 12:38:54 -07:00
watchStar.less Remove old :before icon selectors and update selectors to not use minerva and wikimedia prefixes 2023-09-06 13:53:22 -05:00