From 5c1a2607d9578ad8f33a12007c531f92ed24fb68 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 29 Jun 2016 13:44:25 +0100 Subject: [PATCH] screenshots: Add delay to wait for link inspector images to load Change-Id: I36168f08cc2a8ec320afc8c87ae6518d50db2c57 --- build/screenshots.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/screenshots.js b/build/screenshots.js index c2af5b3af2..648fe5e549 100644 --- a/build/screenshots.js +++ b/build/screenshots.js @@ -373,7 +373,9 @@ function runTests( lang ) { surface.context.inspectors.once( 'opening', function ( win, opening ) { opening.then( function () { - ve.init.target.surface.context.inspectors.windows.link.annotationInput.input.requestRequest.then( function () { + surface.context.inspectors.windows.link.annotationInput.input.requestRequest.then( function () { + // Wait a while for the images to load using a time guesstimate - as they're background + // images it's quite tricky to get load events. setTimeout( function () { done( seleniumUtils.getBoundingRect( [ @@ -381,7 +383,7 @@ function runTests( lang ) { surface.context.inspectors.currentWindow.$element[ 0 ] ] ) ); - }, 500 ); + }, 2500 ); } ); } ); } );