diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 13:16:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 13:16:36 +0000 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/support/capybara.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) | |
download | gitlab-ce-14.5.0-rc42.tar.gz |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/support/capybara.rb')
-rw-r--r-- | spec/support/capybara.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index ac35662ec93..14ef0f1b7e0 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -28,6 +28,8 @@ JS_CONSOLE_FILTER = Regexp.union([ CAPYBARA_WINDOW_SIZE = [1366, 768].freeze +SCREENSHOT_FILENAME_LENGTH = ENV['CI'] || ENV['CI_SERVER'] ? 255 : 99 + # Run Workhorse on the given host and port, proxying to Puma on a UNIX socket, # for a closer-to-production experience Capybara.register_server :puma_via_workhorse do |app, port, host, **options| @@ -113,7 +115,7 @@ Capybara.enable_aria_label = true Capybara::Screenshot.append_timestamp = false Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example| - example.full_description.downcase.parameterize(separator: "_")[0..99] + example.full_description.downcase.parameterize(separator: "_")[0..SCREENSHOT_FILENAME_LENGTH] end # Keep only the screenshots generated from the last failing test suite Capybara::Screenshot.prune_strategy = :keep_last_run |