2024-03-11 12:35:39 +00:00
|
|
|
'use strict';
|
|
|
|
|
2024-09-27 22:01:15 +00:00
|
|
|
( function () {
|
|
|
|
QUnit.module( 've.ui.MWReferenceResultWidget (Cite)', ve.test.utils.newMwEnvironment() );
|
2024-03-11 12:35:39 +00:00
|
|
|
|
2024-09-27 22:01:15 +00:00
|
|
|
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 );
|
|
|
|
} );
|
|
|
|
}() );
|