mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-11 15:06:19 +00:00
980f2ca917
* threw out most of the things from init.js * turned Slider + View into respective modules * pointers should remember position (except on page load) and correctly slide back to their position/to the side Some things still need testing and refactoring. Addshore: - CS fixes and comment out current failing tests Bug: T134395 Change-Id: I78a7095e1d9902314163b1443448f47ef0484d4e
18 lines
489 B
JavaScript
18 lines
489 B
JavaScript
( function ( mw ) {
|
|
var PointerView = mw.libs.revisionSlider.PointerView;
|
|
|
|
QUnit.module( 'ext.RevisionSlider.Revision' );
|
|
|
|
QUnit.test( 'Initialize PointerView', function ( assert ) {
|
|
assert.ok( ( new PointerView( null, 'left-pointer' ) ).render().find( '.left-pointer' ) );
|
|
} );
|
|
|
|
QUnit.test( 'Has offset', function ( assert ) {
|
|
var offset = 30,
|
|
pointer = new PointerView( null, 'left-pointer', offset );
|
|
|
|
assert.equal( pointer.getOffset(), offset );
|
|
} );
|
|
|
|
} )( mediaWiki );
|