mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-04 03:38:17 +00:00
6178ba7936
Change-Id: I82395995dadd3c7f7f8d7973c5e51cc367e11b5a
19 lines
615 B
JavaScript
19 lines
615 B
JavaScript
( function () {
|
|
const PointerView = require( 'ext.RevisionSlider.Slider' ).private.PointerView;
|
|
|
|
QUnit.module( 'ext.RevisionSlider.PointerView' );
|
|
|
|
QUnit.test( 'Initialize PointerView', function ( assert ) {
|
|
assert.true( ( new PointerView( null, 'mw-revslider-pointer' ) ).render().hasClass( 'mw-revslider-pointer' ) );
|
|
} );
|
|
|
|
QUnit.test( 'Is newer pointer', function ( assert ) {
|
|
const pv = new PointerView( null, 'mw-revslider-pointer' );
|
|
pv.render();
|
|
assert.false( pv.isNewerPointer() );
|
|
|
|
pv.getElement().addClass( 'mw-revslider-pointer-newer' );
|
|
assert.true( pv.isNewerPointer() );
|
|
} );
|
|
}() );
|