mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2025-01-10 11:45:23 +00:00
b079031b0a
Add a skin-night-mode-page-disabled class to the HTML element when a page was disabled by the new MinervaNightModeOptions configuration flag. Bug: T356653 Change-Id: I7a6582ef8f66e78cc6f07da06bc4d2a3277cfcf0
19 lines
681 B
JavaScript
19 lines
681 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-night-mode-clientpref-0' );
|
|
mw.user.clientPrefs.set( 'skin-night-mode', '1' );
|
|
assert.strictEqual(
|
|
mw.cookie.get( 'mwclientpreferences' ),
|
|
'skin-night-mode-clientpref-1'
|
|
);
|
|
} );
|
|
} );
|