2024-02-08 22:52:46 +00:00
|
|
|
/*!
|
|
|
|
* 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 );
|
2024-03-18 19:14:23 +00:00
|
|
|
document.documentElement.setAttribute( 'class', 'skin-theme-clientpref-day' );
|
|
|
|
mw.user.clientPrefs.set( 'skin-theme', 'night' );
|
2024-02-08 22:52:46 +00:00
|
|
|
assert.strictEqual(
|
|
|
|
mw.cookie.get( 'mwclientpreferences' ),
|
2024-03-18 19:14:23 +00:00
|
|
|
'skin-theme-clientpref-night'
|
2024-02-08 22:52:46 +00:00
|
|
|
);
|
|
|
|
} );
|
|
|
|
} );
|