mediawiki-extensions-Revisi.../tests/qunit/RevisionSlider.HelpDialog.test.js
thiemowmde 363f24a409 Remove dead code from HelpDialog test
There are not even any <a> elements involved because the language is
set to qqx.

Change-Id: I64a6c414ccb327bc65a606ebd1579b579cd3215a
2024-04-29 11:59:14 +02:00

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)'
);
} );