mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-21 11:12:43 +00:00
363f24a409
There are not even any <a> elements involved because the language is set to qqx. Change-Id: I64a6c414ccb327bc65a606ebd1579b579cd3215a
31 lines
1 KiB
JavaScript
31 lines
1 KiB
JavaScript
QUnit.module( 'ext.RevisionSlider.HelpDialog' );
|
|
|
|
QUnit.test( 'Initialize HelpDialog', function ( assert ) {
|
|
const HelpDialog = require( 'ext.RevisionSlider.Slider' ).HelpDialog;
|
|
const helpDialog = new HelpDialog(),
|
|
windowManager = new OO.ui.WindowManager();
|
|
|
|
$( document.body ).append( windowManager.$element );
|
|
windowManager.addWindows( [ helpDialog ] );
|
|
|
|
assert.strictEqual( helpDialog.slides.length, 4 );
|
|
assert.strictEqual( helpDialog.slidePointer, 0 );
|
|
|
|
assert.strictEqual(
|
|
helpDialog.slides[ 0 ].$element.find( '.mw-revslider-help-dialog-text' ).text(),
|
|
'(revisionslider-help-dialog-slide1)'
|
|
);
|
|
assert.strictEqual(
|
|
helpDialog.slides[ 1 ].$element.find( '.mw-revslider-help-dialog-text' ).text(),
|
|
'(revisionslider-help-dialog-slide2)'
|
|
);
|
|
assert.strictEqual(
|
|
helpDialog.slides[ 2 ].$element.find( '.mw-revslider-help-dialog-text' ).text(),
|
|
'(revisionslider-help-dialog-slide3a)'
|
|
);
|
|
assert.strictEqual(
|
|
helpDialog.slides[ 3 ].$element.find( '.mw-revslider-help-dialog-text' ).text(),
|
|
'(revisionslider-help-dialog-slide4)'
|
|
);
|
|
} );
|