From a1f103576ac96a139a133500d9e4bd21f935e00c Mon Sep 17 00:00:00 2001 From: Greg Look Date: Wed, 2 Dec 2015 15:13:02 -0800 Subject: [PATCH] Wait for all panels to render in PhantomJS. --- vendor/phantomjs/render.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vendor/phantomjs/render.js b/vendor/phantomjs/render.js index 33fda200cba..5cd442eb338 100644 --- a/vendor/phantomjs/render.js +++ b/vendor/phantomjs/render.js @@ -36,7 +36,8 @@ page.open(params.url, function (status) { var canvas = page.evaluate(function() { var body = angular.element(document.body); // 1 var rootScope = body.scope().$root; - return rootScope.performance.panelsRendered > 0; + var panels = angular.element('div.panel').length; + return rootScope.performance.panelsRendered >= panels; }); if (canvas || tries === 1000) {