mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Create smoke test screenshot directory in rake task.
This commit is contained in:
@@ -26,7 +26,7 @@ task "smoke:test" do
|
|||||||
request.basic_auth(ENV['AUTH_USER'], ENV['AUTH_PASSWORD'])
|
request.basic_auth(ENV['AUTH_USER'], ENV['AUTH_PASSWORD'])
|
||||||
end
|
end
|
||||||
|
|
||||||
dir = 'tmp/smoke-test-screenshots'
|
dir = ENV["SMOKE_TEST_SCREENSHOT_PATH"] || 'tmp/smoke-test-screenshots'
|
||||||
FileUtils.mkdir_p(dir) unless Dir.exists?(dir)
|
FileUtils.mkdir_p(dir) unless Dir.exists?(dir)
|
||||||
|
|
||||||
start = Time.now
|
start = Time.now
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const path = require('path');
|
|||||||
});
|
});
|
||||||
|
|
||||||
const takeFailureScreenshot = function() {
|
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}`);
|
console.log(`Screenshot of failure taken at ${screenshotPath}`);
|
||||||
return page.screenshot({ path: screenshotPath, fullPage: true });
|
return page.screenshot({ path: screenshotPath, fullPage: true });
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user