mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Remove not needed boilerplate from QUnit tests
These tests obviously don't need this extra environment. They run just fine (and faster) without. Bug: T289560 Change-Id: Ib186a07cd556f741e0440ffa54ae6aaaf626adcd
This commit is contained in:
parent
46bccb570a
commit
a0e613d8fc
|
@ -5,7 +5,7 @@
|
|||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
QUnit.module( 've.ce.ContentBranchNode (MW)', ve.test.utils.mwEnvironment );
|
||||
QUnit.module( 've.ce.ContentBranchNode (MW)' );
|
||||
|
||||
/* Tests */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
( function () {
|
||||
|
||||
QUnit.module( 've.dm.MWTemplateSpecModel', ve.test.utils.mwEnvironment );
|
||||
QUnit.module( 've.dm.MWTemplateSpecModel' );
|
||||
|
||||
/**
|
||||
* @param {string[]} [parameterNames]
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
QUnit.module( 've.dm.MWTransclusionNode', ve.test.utils.mwEnvironment );
|
||||
QUnit.module( 've.dm.MWTransclusionNode' );
|
||||
|
||||
/* Tests */
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
QUnit.module( 've.dm.Document (MW)', ve.test.utils.mwEnvironment );
|
||||
QUnit.module( 've.dm.Document (MW)' );
|
||||
|
||||
/* Tests */
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
QUnit.module( 've.dm.MWImageModel', ve.test.utils.mwEnvironment );
|
||||
QUnit.module( 've.dm.MWImageModel' );
|
||||
|
||||
/* Tests */
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
QUnit.module( 've.dm.MWTemplateModel', ve.test.utils.mwEnvironment );
|
||||
QUnit.module( 've.dm.MWTemplateModel' );
|
||||
|
||||
/**
|
||||
* Create a new MWTemplateModel initialized with a static transclusion data fixture.
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
( function () {
|
||||
QUnit.module( 've.ui.MWTransclusionOutlineParameterWidget', ve.test.utils.mwEnvironment );
|
||||
QUnit.module( 've.ui.MWTransclusionOutlineParameterWidget' );
|
||||
|
||||
QUnit.test( 'interprets param with no attributes', ( assert ) => {
|
||||
const layout = new 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 );
|
||||
} );
|
||||
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 } );
|
||||
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 );
|
||||
} );
|
||||
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 } );
|
||||
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 );
|
||||
} );
|
||||
}() );
|
||||
assert.strictEqual( layout.checkbox.isDisabled(), false );
|
||||
assert.strictEqual( layout.checkbox.isSelected(), true );
|
||||
assert.strictEqual( layout.checkbox.getTitle(), null );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue