diff --git a/modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js b/modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js index 063f3d9acc..777dd49c34 100644 --- a/modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js +++ b/modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js @@ -7,89 +7,6 @@ QUnit.module( 've.init.mw.DesktopArticleTarget', ve.test.utils.mwEnvironment ); -QUnit.test( 'init', function ( assert ) { - var - response = { - visualeditor: { - result: 'success', - notices: [], - checkboxesDef: { - wpMinoredit: { - id: 'wpMinoredit', - 'label-message': 'minoredit', - tooltip: 'minoredit', - 'label-id': 'mw-editpage-minoredit', - 'legacy-name': 'minor', - 'default': false - }, - wpWatchthis: { - id: 'wpWatchthis', - 'label-message': 'watchthis', - tooltip: 'watch', - 'label-id': 'mw-editpage-watch', - 'legacy-name': 'watch', - 'default': true - } - }, - checkboxesMessages: { - 'accesskey-minoredit': 'i', - 'tooltip-minoredit': 'Mark this as a minor edit', - minoredit: 'This is a minor edit', - 'accesskey-watch': 'w', - 'tooltip-watch': 'Add this page to your watchlist', - watchthis: 'Watch this page' - }, - templates: '
', - links: { - missing: [], - known: 1 - }, - protectedClasses: '', - basetimestamp: '20161119005107', - starttimestamp: '20180831122319', - oldid: 1804, - content: '\n' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - 'Empty' + - '' + - '' + - '' + - '' + - '
' + - '' + - '', - etag: '"1804/a4fc0409-ad18-11e8-9b45-dd8cefbedb6d"', - switched: false, - fromEditedState: false - } - }, - target = new ve.init.mw.DesktopArticleTarget(), - dataPromise = $.Deferred().resolve( response ).promise(), - done = assert.async(); - - target.on( 'surfaceReady', function () { - assert.strictEqual( target.getSurface().getModel().getDocument().getLang(), 'he', 'Page language is passed through from config' ); - assert.strictEqual( target.getSurface().getModel().getDocument().getDir(), 'rtl', 'Page direction is passed through from config' ); - target.destroy(); - mw.config.get( 'wgVisualEditor' ).pageLanguageCode = 'en'; - mw.config.get( 'wgVisualEditor' ).pageLanguageDir = 'ltr'; - done(); - } ); - mw.config.get( 'wgVisualEditor' ).pageLanguageCode = 'he'; - mw.config.get( 'wgVisualEditor' ).pageLanguageDir = 'rtl'; - mw.config.get( 'wgVisualEditorConfig' ).showBetaWelcome = false; - target.activate( dataPromise ); -} ); - QUnit.test( 'compatibility', function ( assert ) { var i, profile, matches, compatibility, cases = [