mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-23 20:12:57 +00:00
73917d493b
The exact rendering of each item should be part of the widget. This also allows a better application of the sub-ref indent. Bug: T375841 Change-Id: Ic2c24f40d59f41b316c6d6f362726c1ee68f2102
23 lines
552 B
JavaScript
23 lines
552 B
JavaScript
'use strict';
|
|
|
|
( function () {
|
|
QUnit.module( 've.ui.MWReferenceResultWidget (Cite)', ve.test.utils.newMwEnvironment() );
|
|
|
|
function getConfigMock() {
|
|
return {
|
|
item: {
|
|
$refContent: '',
|
|
reference: {},
|
|
footnoteLabel: '',
|
|
name: ''
|
|
}
|
|
};
|
|
}
|
|
|
|
QUnit.test( 'Initialization', ( assert ) => {
|
|
const widget = new ve.ui.MWReferenceResultWidget( getConfigMock() );
|
|
assert.true( widget instanceof OO.ui.OptionWidget );
|
|
assert.strictEqual( widget.$element.children( '.ve-ui-mwReferenceResultWidget-shield' ).length, 0 );
|
|
} );
|
|
}() );
|