mediawiki-extensions-Multim.../tests/qunit/mmv.testhelpers.js
Gilles Dubuc 98e03d31c8 Test metadata visibility in fullscreen mode
Add metadata visibility logic to the test
Convert the code to CSS since writing the test made me
realise that the current JS was superfluous

Change-Id: I80c2f1860cc021e9bdf09345647b288de746f1e3
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/140
2014-01-30 08:39:55 +01:00

17 lines
540 B
JavaScript

( function ( mw, $ ) {
var MTH = {};
MTH.enterFullscreenMock = function() {
this.first().addClass( 'jq-fullscreened' ).data( 'isFullscreened', true );
$( document ).trigger( $.Event( 'jq-fullscreen-change', { element: this, fullscreen: true } ) );
};
MTH.exitFullscreenMock = function() {
this.first().removeClass( 'jq-fullscreened' ).data( 'isFullscreened', false );
$( document ).trigger( $.Event( 'jq-fullscreen-change', { element: this, fullscreen: false } ) );
};
mw.mmvTestHelpers = MTH;
} )( mediaWiki, jQuery );