Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Enable Capybara screenshots S3 upload only with valid secrets

Christophe Bliarda8052c97c695
diff --git a/spec/support/capybara_browser_screenshots.rb b/spec/support/capybara_browser_screenshots.rb
index 8179e3abe46..57ab7b680a4 100644
--- a/spec/support/capybara_browser_screenshots.rb
+++ b/spec/support/capybara_browser_screenshots.rb
@@ -7,7 +7,7 @@ require 'capybara-screenshot/rspec'
Capybara::Screenshot.prune_strategy = :keep_last_run
# Set up S3 uploads if desired
-if ENV['CAPYBARA_AWS_ACCESS_KEY_ID']
+if ENV['CAPYBARA_AWS_ACCESS_KEY_ID'].present?
Capybara::Screenshot.s3_configuration = {
s3_client_credentials: {
access_key_id: ENV.fetch('CAPYBARA_AWS_ACCESS_KEY_ID'),