mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-18 16:51:05 +00:00
5d6b866890
The classes: - skin-night-mode-clientpref-0 - skin-night-mode-clientpref-1 - skin-night-mode-clientpref-2 is being replaced with - skin-theme-clientpref-day - skin-theme-clientpref-night - skin-theme-clientpref-os - Moved $forceNightMode to be a text parameter (dat|night|os) - Keep adding the old classes to the html element, to give the ability of gradual deployment The preference is renamed from minerva-night-mode to minerva-theme (a follow up to consider migrating existing values will follow). The query string minervanightmode continues to behave the same but now accepts other values such as day, night and os. Bug: T359983 Change-Id: Ia253de68f94236e7fe2219b736dd6084c64ce838
19 lines
676 B
JavaScript
19 lines
676 B
JavaScript
/*!
|
|
* Minerva integration tests.
|
|
*
|
|
* This should only be used to test APIs that Minerva depends on to work.
|
|
* For unit tests please see tests/jest.
|
|
*/
|
|
QUnit.module( 'Minerva (integration)', function () {
|
|
QUnit.test( '[T356653] Client preferences: Check assumptions about the cookie it writes to', function ( assert ) {
|
|
mw.cookie.set( 'mwclientpreferences', '' );
|
|
this.sandbox.stub( mw.user, 'isAnon' ).returns( true );
|
|
document.documentElement.setAttribute( 'class', 'skin-theme-clientpref-day' );
|
|
mw.user.clientPrefs.set( 'skin-theme', 'night' );
|
|
assert.strictEqual(
|
|
mw.cookie.get( 'mwclientpreferences' ),
|
|
'skin-theme-clientpref-night'
|
|
);
|
|
} );
|
|
} );
|