mediawiki-extensions-Visual.../modules/ve-mw/tests/ui/widgets/ve.ui.MWTransclusionOutlineWikitextWidget.test.js
Thiemo Kreuz 352e7795ca More meaningful assertions for all outline part widgets
Bug: T289560
Change-Id: I81f882d6e6793198371ff9ff3e1e5bbbec98e0d9
2021-08-24 13:17:16 +02:00

14 lines
500 B
JavaScript

QUnit.module( 've.ui.MWTransclusionOutlineWikitextWidget' );
QUnit.test( 'Constructor', ( assert ) => {
const transclusion = new ve.dm.MWTransclusionModel(),
content = new ve.dm.MWTransclusionContentModel( transclusion ),
widget = new ve.ui.MWTransclusionOutlineWikitextWidget( content );
assert.strictEqual( widget.getData(), 'part_0' );
assert.strictEqual(
widget.$element.find( '.ve-ui-mwTransclusionOutlineButtonWidget' ).text(),
'visualeditor-dialog-transclusion-wikitext'
);
} );