Merge "Smoke test for MultiLightbox class."

This commit is contained in:
jenkins-bot 2013-12-10 02:20:30 +00:00 committed by Gerrit Code Review
commit 9b02f8ebe4
2 changed files with 12 additions and 0 deletions

View file

@ -120,6 +120,7 @@ class MultimediaViewerHooks {
'tests/qunit/ext.multimediaViewer.test.js',
'tests/qunit/lightboximage.test.js',
'tests/qunit/lightboxinterface.test.js',
'tests/qunit/multilightbox.test.js',
),
'dependencies' => array(
'ext.multimediaViewer',

View file

@ -0,0 +1,11 @@
( function () {
QUnit.module( 'ext.multimediaViewer.multiLightbox', QUnit.newMwEnvironment() );
QUnit.test( 'Smoke test', 1, function ( assert ) {
var lightboxImage = new window.LightboxImage( 'http://en.wikipedia.org/w/skins/vector/images/search-ltr.png' ),
multiLightbox = new window.MultiLightbox( [lightboxImage] );
assert.strictEqual( multiLightbox.currentIndex, 0, 'currentIndex initialized correctly.' );
} );
}( mediaWiki, jQuery ) );