Skip to content

A platform for community discussion. Free, open, simple.

DEV: Create smoke test screenshot directory in rake task.

Guo Xiang Tandb4af262dcd3
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 });
};