mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-23 04:02:50 +00:00
f5de8ee108
* eslint-config-wikimedia: 0.27.0 → 0.28.0 The following rules are failing and were disabled: * modules: * no-mixed-spaces-and-tabs * no-jquery/no-extend * implicit-arrow-linebreak * tests/qunit: * no-jquery/no-extend * grunt-stylelint: 0.19.0 → 0.20.0 * stylelint-config-wikimedia: 0.16.1 → 0.17.1 Change-Id: I3fd3c4a2cbb03d3aa4c8efb658e33d14d24cd518
31 lines
1 KiB
JavaScript
31 lines
1 KiB
JavaScript
QUnit.module( 'ext.RevisionSlider.HelpDialog' );
|
|
|
|
QUnit.test( 'Initialize HelpDialog', ( 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)'
|
|
);
|
|
} );
|