diff --git a/front/src/views/queue.html b/front/src/views/queue.html index aeba547..2556681 100644 --- a/front/src/views/queue.html +++ b/front/src/views/queue.html @@ -17,16 +17,17 @@
Test is running...
+

(auto-refresh activated)

+

(Phantomas launched)

(DOM Ready fired)

(page loaded, waiting for late requests)

(now simulating compression, optimization and minification)

-

(calculating score and retrieving screenshot)

+

(calculating score and retrieving screenshot)

-->
Test complete
diff --git a/lib/index.js b/lib/index.js index ae44a18..f8b81e1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -29,18 +29,15 @@ var yellowLabTools = function(url, options) { .then(function(data) { - // If a screenshot save function was provided in the options + // If a screenshot saveFunction was provided in the options if (typeof options.saveFile === 'function') { debug('Now optimizing screenshot...'); // Remove uneeded temp screenshot path delete data.params.options.screenshot; - // Add the screenshot url instead - data.screenshotUrl = '/api/results/' + data.runId + '/screenshot.jpg'; - // TODO: temporarily set all screenshot sizes to 600px, until we find a solution - ScreenshotHandler.findAndOptimizeScreenshot(600) + ScreenshotHandler.findAndOptimizeScreenshot(600); .then(function(screenshotBuffer) { debug('Screenshot optimized, now saving...'); @@ -51,6 +48,9 @@ var yellowLabTools = function(url, options) { .then(function(response) { debug('Screenshot saved'); debug(response); + + // Add the screenshot API url + data.screenshotUrl = '/api/results/' + data.runId + '/screenshot.jpg'; }) .catch(function(err) {