mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-18 18:00:44 +00:00
759c081add
Most callers use it as if it's a `getElement` call anyway. There is one .initialize method left in the HelpDialog class. That's part of the upstream OOUI Window interfaces. Change-Id: I5727c59ad0ad05d712d51d255906ddc44e898668
19 lines
623 B
JavaScript
19 lines
623 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' ) ).getElement().hasClass( 'mw-revslider-pointer' ) );
|
|
} );
|
|
|
|
QUnit.test( 'Is newer pointer', function ( assert ) {
|
|
const pv = new PointerView( null, 'mw-revslider-pointer' );
|
|
pv.getElement();
|
|
assert.false( pv.isNewerPointer() );
|
|
|
|
pv.getElement().addClass( 'mw-revslider-pointer-newer' );
|
|
assert.true( pv.isNewerPointer() );
|
|
} );
|
|
}() );
|