DEV: Create smoke test screenshot directory in rake task.
This commit is contained in:
parent
fe5a48997c
commit
db4af262dc
|
@ -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
|
||||
|
|
|
@ -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 });
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue