Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4070028
integration.test.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
integration.test.js
View Options
/* global QUnit */
const
clientPreferences
=
require
(
'skins.vector.clientPreferences'
);
/*!
* Vector integration tests.
*
* This should only be used to test APIs that Vector depends on to work.
* For unit tests please see tests/jest.
*/
QUnit
.
module
(
'Vector (integration)'
,
()
=>
{
QUnit
.
test
(
'Client preferences: Behaves same for all users'
,
function
(
assert
)
{
const
sandbox
=
this
.
sandbox
;
const
helper
=
(
feature
,
isNamedReturnValue
)
=>
{
document
.
documentElement
.
setAttribute
(
'class'
,
`
${
feature
}
-clientpref-0`
);
const
stub
=
sandbox
.
stub
(
mw
.
user
,
'isNamed'
,
()
=>
isNamedReturnValue
);
clientPreferences
.
toggleDocClassAndSave
(
feature
,
'1'
,
{
'vector-feature-limited-width'
:
{
options
:
[
'1'
,
'0'
],
preferenceKey
:
'vector-limited-width'
}
}
);
stub
.
restore
();
return
document
.
documentElement
.
getAttribute
(
'class'
);
};
assert
.
strictEqual
(
helper
(
'vector-feature-limited-width'
,
false
),
helper
(
'vector-feature-limited-width'
,
true
),
'The same classes are modified regardless of the user status.'
);
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 16 2026, 23:16 (11 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
15/43/0abe08db5e302fac09bac613d0f0
Default Alt Text
integration.test.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment