mediawiki-extensions-Revisi.../tests/RevisionSlider.PointerView.test.js
Jakob Warkotsch 980f2ca917 Create Slider module.
* 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
2016-05-10 17:38:46 +01:00

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 );