mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "screenshots: Fix environment setup"
This commit is contained in:
commit
81b256ca4f
|
@ -15,8 +15,7 @@ module.exports = function ( grunt ) {
|
|||
timeout: 5 * 60 * 1000,
|
||||
require: [
|
||||
function () {
|
||||
// eslint-disable-next-line no-undef
|
||||
langs = [ grunt.option( 'lang' ) || 'en' ];
|
||||
global.langs = [ grunt.option( 'lang' ) || 'en' ];
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -27,8 +26,7 @@ module.exports = function ( grunt ) {
|
|||
timeout: 5 * 60 * 1000,
|
||||
require: [
|
||||
function () {
|
||||
// eslint-disable-next-line no-undef
|
||||
langs = require( './build/tasks/screenshotLangs.json' ).langs;
|
||||
global.langs = require( './build/tasks/screenshotLangs.json' ).langs;
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
@ -101,12 +101,16 @@ module.exports = function () {
|
|||
mw.hook( 've.activationComplete' ).add( function () {
|
||||
var target = ve.init.target,
|
||||
surfaceView = target.getSurface().getView();
|
||||
// Modify the document to make the save button blue
|
||||
// Wait for focus
|
||||
surfaceView.once( 'focus', function () {
|
||||
target.surface.getModel().getFragment().insertContent( ' ' ).collapseToStart().select();
|
||||
|
||||
// eslint-disable-next-line no-jquery/no-deferred
|
||||
var welcomeDialogPromise = target.welcomeDialogPromise || $.Deferred().resolve().promise();
|
||||
|
||||
welcomeDialogPromise.then( function () {
|
||||
// Hide edit notices
|
||||
target.toolbar.tools.notices.getPopup().toggle( false );
|
||||
surfaceView.focus();
|
||||
// Modify the document to make the save button blue
|
||||
target.surface.getModel().getFragment().insertContent( ' ' ).collapseToStart().select();
|
||||
// Wait for save button fade
|
||||
setTimeout( function () {
|
||||
veDone( { width: window.innerWidth, height: window.innerHeight } );
|
||||
|
|
Loading…
Reference in a new issue