Debian Codegraph @

skins/MinervaNeue/tests/qunit/skins.minerva.scripts/integration.test.js

raw symbols SCIP
1 /*!
2 * Minerva integration tests.
3 *
4 * This should only be used to test APIs that Minerva depends on to work.
5 * For unit tests please see tests/jest.
6 */
7 QUnit.module( 'Minerva (integration)', () => {
8 QUnit.test( '[T356653] Client preferences: Check assumptions about the cookie it writes to', function ( assert ) {
9 mw.cookie.set( 'mwclientpreferences', '' );
10 this.sandbox.stub( mw.user, 'isAnon' ).returns( true );
11 document.documentElement.setAttribute( 'class', 'skin-theme-clientpref-day' );
12 mw.user.clientPrefs.set( 'skin-theme', 'night' );
13 assert.strictEqual(
14 mw.cookie.get( 'mwclientpreferences' ),
15 'skin-theme-clientpref-night'
16 );
17 } );
18 } );