mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-19 05:15:52 +00:00
ca84de7c9d
Changes: * Add sessionToken and pageToken properties to the BOOT action and update the preview reducer. Supporting changes: * Move the mw.popups.createActions to ext.popups/boot.js so that Redux is used in one file and the actions can be tested in isolation more easily. Change-Id: Icd61bf1aeb466899e047432bf9798e2574652830
26 lines
508 B
JavaScript
26 lines
508 B
JavaScript
( function ( mw ) {
|
|
|
|
QUnit.module( 'ext.popups/actions' );
|
|
|
|
QUnit.test( '#boot', 1, function ( assert ) {
|
|
var isUserInCondition = function () {
|
|
return false;
|
|
},
|
|
sessionID = '0123456789',
|
|
generateToken = function () {
|
|
return '9876543210';
|
|
};
|
|
|
|
assert.deepEqual(
|
|
mw.popups.actions.boot( isUserInCondition, sessionID, generateToken ),
|
|
{
|
|
type: 'BOOT',
|
|
isUserInCondition: false,
|
|
sessionToken: '0123456789',
|
|
pageToken: '9876543210'
|
|
}
|
|
);
|
|
} );
|
|
|
|
}( mediaWiki ) );
|