mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-15 03:33:45 +00:00
a2774984c4
Changes include: - not passing in HTML attributes when creating tag elements, - creating HTML elements instead of appending hand-crafted HTML, - single append() calls instead of multiple consecutie appends, - not using raw HTML messages when not needed, - prefixing all CSS classes and IDs with "mw-" to avoid potential name conflicts. Change-Id: I164538bbaf44d46a4c66659f56e07ec7225d7fa9
19 lines
487 B
JavaScript
19 lines
487 B
JavaScript
( function ( mw ) {
|
|
var Pointer = mw.libs.revisionSlider.Pointer;
|
|
|
|
QUnit.module( 'ext.RevisionSlider.Pointer' );
|
|
|
|
QUnit.test( 'Initialize Pointer', function ( assert ) {
|
|
assert.ok( ( new Pointer( 'mw-revslider-pointer' ) ).getView().render().hasClass( 'mw-pointer' ) );
|
|
} );
|
|
|
|
QUnit.test( 'Set and get position', function ( assert ) {
|
|
var pointer = new Pointer(),
|
|
pos = 42;
|
|
|
|
pointer.setPosition( pos );
|
|
assert.equal( pointer.getPosition(), pos );
|
|
} );
|
|
|
|
} )( mediaWiki );
|