mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:25:35 +08:00
DEV: Store smoke tests failure image in a dedicated tmp folder.
This commit is contained in:
parent
30279a4843
commit
fe5a48997c
|
@ -26,6 +26,9 @@ task "smoke:test" do
|
|||
request.basic_auth(ENV['AUTH_USER'], ENV['AUTH_PASSWORD'])
|
||||
end
|
||||
|
||||
dir = 'tmp/smoke-test-screenshots'
|
||||
FileUtils.mkdir_p(dir) unless Dir.exists?(dir)
|
||||
|
||||
start = Time.now
|
||||
while true
|
||||
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
|
||||
|
|
|
@ -26,7 +26,7 @@ const path = require('path');
|
|||
});
|
||||
|
||||
const takeFailureScreenshot = function() {
|
||||
const screenshotPath = `${process.env.SCREENSHOT_PATH || 'tmp'}/smoke-test.png`;
|
||||
const screenshotPath = `${process.env.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 });
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user