[QA] Ensure screenshots are save in subfolder per QA run

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2018-07-09 17:40:51 +02:00
parent c7c630f142
commit eb4e629fa9
No known key found for this signature in database
GPG Key ID: 98DFFD1C0C62B70B
2 changed files with 5 additions and 1 deletions

View File

@ -85,6 +85,10 @@ module QA
driver.browser.save_screenshot(path)
end
Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
File.join(QA::Runtime::Namespace.name, example.file_path.sub('./qa/specs/features/', ''))
end
Capybara.configure do |config|
config.default_driver = :chrome
config.javascript_driver = :chrome

View File

@ -8,7 +8,7 @@ module QA
end
def name
'qa-test-' + time.strftime('%d-%m-%Y-%H-%M-%S')
"qa-test-#{time.strftime('%Y-%m-%d-%Y-%H-%M-%S')}"
end
def path