From db4af262dcd3d9a89a59474993d8bdac8b6a2574 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 30 May 2018 16:20:18 +0800 Subject: [PATCH] DEV: Create smoke test screenshot directory in rake task. --- lib/tasks/smoke_test.rake | 2 +- test/smoke_test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/smoke_test.rake b/lib/tasks/smoke_test.rake index b1856e3864b..87b526e7f6f 100644 --- a/lib/tasks/smoke_test.rake +++ b/lib/tasks/smoke_test.rake @@ -26,7 +26,7 @@ task "smoke:test" do request.basic_auth(ENV['AUTH_USER'], ENV['AUTH_PASSWORD']) end - dir = 'tmp/smoke-test-screenshots' + dir = ENV["SMOKE_TEST_SCREENSHOT_PATH"] || 'tmp/smoke-test-screenshots' FileUtils.mkdir_p(dir) unless Dir.exists?(dir) start = Time.now diff --git a/test/smoke_test.js b/test/smoke_test.js index 77983e3ac30..095d2b95ab2 100644 --- a/test/smoke_test.js +++ b/test/smoke_test.js @@ -26,7 +26,7 @@ const path = require('path'); }); const takeFailureScreenshot = function() { - const screenshotPath = `${process.env.SCREENSHOT_PATH || 'tmp/smoke-test-screenshots'}/smoke-test-${Date.now()}.png`; + const screenshotPath = `${process.env.SMOKE_TEST_SCREENSHOT_PATH || 'tmp/smoke-test-screenshots'}/smoke-test-${Date.now()}.png`; console.log(`Screenshot of failure taken at ${screenshotPath}`); return page.screenshot({ path: screenshotPath, fullPage: true }); };