mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 10:59:56 +00:00
a0e613d8fc
These tests obviously don't need this extra environment. They run just fine (and faster) without. Bug: T289560 Change-Id: Ib186a07cd556f741e0440ffa54ae6aaaf626adcd
26 lines
1 KiB
JavaScript
26 lines
1 KiB
JavaScript
QUnit.module( 've.ui.MWTransclusionOutlineParameterWidget' );
|
|
|
|
QUnit.test( 'interprets param with no attributes', ( assert ) => {
|
|
const layout = new ve.ui.MWTransclusionOutlineParameterWidget( {} );
|
|
|
|
assert.strictEqual( layout.checkbox.isDisabled(), false );
|
|
assert.strictEqual( layout.checkbox.isSelected(), false );
|
|
assert.strictEqual( layout.checkbox.getTitle(), null );
|
|
} );
|
|
|
|
QUnit.test( 'interprets required param', ( assert ) => {
|
|
const layout = new ve.ui.MWTransclusionOutlineParameterWidget( { required: true } );
|
|
|
|
assert.strictEqual( layout.checkbox.isDisabled(), true );
|
|
assert.strictEqual( layout.checkbox.isSelected(), true );
|
|
assert.notStrictEqual( layout.checkbox.getTitle(), null );
|
|
} );
|
|
|
|
QUnit.test( 'interprets selected param', ( assert ) => {
|
|
const layout = new ve.ui.MWTransclusionOutlineParameterWidget( { selected: true } );
|
|
|
|
assert.strictEqual( layout.checkbox.isDisabled(), false );
|
|
assert.strictEqual( layout.checkbox.isSelected(), true );
|
|
assert.strictEqual( layout.checkbox.getTitle(), null );
|
|
} );
|