2023-06-22 09:41:37 +00:00
|
|
|
( function () {
|
|
|
|
const Pointer = require( 'ext.RevisionSlider.Slider' ).private.Pointer;
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2023-06-22 09:41:37 +00:00
|
|
|
QUnit.module( 'ext.RevisionSlider.Pointer' );
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2023-06-22 09:41:37 +00:00
|
|
|
QUnit.test( 'Initialize Pointer', function ( assert ) {
|
|
|
|
assert.true( ( new Pointer( 'mw-revslider-pointer' ) ).getView().render().hasClass( 'mw-revslider-pointer' ) );
|
|
|
|
} );
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2023-06-22 09:41:37 +00:00
|
|
|
QUnit.test( 'Set and get position', function ( assert ) {
|
|
|
|
const pointer = new Pointer(),
|
|
|
|
pos = 42;
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2023-06-22 09:41:37 +00:00
|
|
|
pointer.setPosition( pos );
|
|
|
|
assert.strictEqual( pointer.getPosition(), pos );
|
|
|
|
} );
|
|
|
|
}() );
|