From d1681c3d88dc40929aa4c8de7d05fe56a6b6ceef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Sun, 21 Mar 2021 23:53:04 +0000 Subject: [PATCH] Temporarily remove queue messages --- front/src/views/queue.html | 5 +++-- lib/index.js | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) 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) {