2016-12-12 19:26:55 +00:00
|
|
|
( function ( $, mw ) {
|
|
|
|
QUnit.module( 'ext.popups/settingsDialog' );
|
|
|
|
|
|
|
|
QUnit.test( '#render', function ( assert ) {
|
|
|
|
var boundActions = {
|
|
|
|
saveSettings: function () {},
|
|
|
|
hideSettings: function () {}
|
|
|
|
},
|
|
|
|
expected = {
|
|
|
|
appendTo: function () {},
|
|
|
|
show: function () {},
|
2016-12-13 18:04:03 +00:00
|
|
|
hide: function () {},
|
2016-12-14 13:35:16 +00:00
|
|
|
toggleHelp: function () {},
|
|
|
|
setEnabled: function () {}
|
2016-12-12 19:26:55 +00:00
|
|
|
},
|
|
|
|
result = mw.popups.createSettingsDialogRenderer()( boundActions );
|
|
|
|
|
|
|
|
// Specifically NOT a deep equal. Only structure.
|
|
|
|
assert.propEqual(
|
|
|
|
result,
|
|
|
|
expected
|
|
|
|
);
|
|
|
|
} );
|
|
|
|
|
|
|
|
// FIXME: Add Qunit integration tests about the rendering and the behavior of
|
|
|
|
// the settings dialog.
|
|
|
|
|
|
|
|
} )( jQuery, mediaWiki );
|