|
|
@ -68,6 +68,18 @@ Capybara.configure do |config| |
|
|
|
config.visible_text_only = true |
|
|
|
config.visible_text_only = true |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set up S3 uploads if desired |
|
|
|
|
|
|
|
if ENV['OPENPROJECT_ENABLE_CAPYBARA_SCREENSHOT_S3_UPLOADS'] && ENV['AWS_ACCESS_KEY_ID'] |
|
|
|
|
|
|
|
Capybara::Screenshot.s3_configuration = { |
|
|
|
|
|
|
|
s3_client_credentials: { |
|
|
|
|
|
|
|
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'), |
|
|
|
|
|
|
|
secret_access_key: ENV.fetch('AWS_ACCESS_KEY_SECRET'), |
|
|
|
|
|
|
|
region: ENV.fetch('AWS_REGION', 'eu-west-1') |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
bucket_name: ENV.fetch('S3_BUCKET_NAME', 'openproject-travis-logs') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
unless (env_no = ENV['TEST_ENV_NUMBER'].to_i).zero? |
|
|
|
unless (env_no = ENV['TEST_ENV_NUMBER'].to_i).zero? |
|
|
|
Capybara.server_port = 8888 + env_no |
|
|
|
Capybara.server_port = 8888 + env_no |
|
|
|
|
|
|
|
|
|
|
|