2020-11-20 07:46:57 +00:00
|
|
|
var Pointer = require( 'ext.RevisionSlider.Slider' ).private.Pointer;
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2020-11-18 09:11:12 +00:00
|
|
|
QUnit.module( 'ext.RevisionSlider.Pointer' );
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2020-11-18 09:11:12 +00:00
|
|
|
QUnit.test( 'Initialize Pointer', function ( assert ) {
|
2022-01-13 12:15:32 +00:00
|
|
|
assert.true( ( new Pointer( 'mw-revslider-pointer' ) ).getView().render().hasClass( 'mw-revslider-pointer' ) );
|
2020-11-18 09:11:12 +00:00
|
|
|
} );
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2020-11-18 09:11:12 +00:00
|
|
|
QUnit.test( 'Set and get position', function ( assert ) {
|
|
|
|
var pointer = new Pointer(),
|
|
|
|
pos = 42;
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2020-11-18 09:11:12 +00:00
|
|
|
pointer.setPosition( pos );
|
|
|
|
assert.strictEqual( pointer.getPosition(), pos );
|
|
|
|
} );
|