mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
Merge "screenshots: If setup fails, don't generate a screenshot"
This commit is contained in:
commit
e7ec740c74
|
@ -43,6 +43,8 @@ function createScreenshotEnvironment( test ) {
|
|||
}, function ( e ) {
|
||||
// Log error (timeout)
|
||||
console.error( e.message );
|
||||
// Setup failed, set clientSize to null so no screenshots are generated
|
||||
clientSize = null;
|
||||
} )
|
||||
);
|
||||
} );
|
||||
|
@ -72,6 +74,11 @@ function createScreenshotEnvironment( test ) {
|
|||
}
|
||||
|
||||
function runScreenshotTest( name, lang, clientScript, padding ) {
|
||||
if ( !clientSize ) {
|
||||
// Setup failed, don't generated a broken screenshot
|
||||
return;
|
||||
}
|
||||
|
||||
const filename = './screenshots/' + name + '-' + lang + '.png';
|
||||
|
||||
driver.manage().timeouts().setScriptTimeout( TIMEOUT );
|
||||
|
|
Loading…
Reference in a new issue