Smoke test for MultiLightbox class.

Change-Id: Iab8a80d842d4252a68bca2a4de92acccd835c978
This commit is contained in:
Aaron Arcos 2013-12-09 18:02:48 -08:00
parent 8695964ea4
commit 83aa9c6a6b
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 ) );