<commit_before>require_relative './set_up'

RSpec.configure do |config|
  config.before(:each, type: :system) do

    Capybara.register_server :puma_wrapper do |app, port, host, **_options|

      # update fqdn Setting according to random assigned Rack server port
      Setting.set('fqdn', "#{host}:#{port}")

      # start a silenced Puma as application server
      Capybara.servers[:puma].call(app, port, host, { Silent: true, Host: '0.0.0.0', Threads: '0:16' })
    end
    Capybara.server = :puma_wrapper

    # set the Host from gather container IP for CI runs
    if ENV['CI'].present?
      ip_address = Socket.ip_address_list.detect(&:ipv4_private?).ip_address
      host!("http://#{ip_address}")
    end

    # set custom Zammad driver (e.g. zammad_chrome) for special
    # functionalities and CI requirements
    driven_by(:"zammad_#{ENV.fetch('BROWSER', 'firefox')}")
  end
end<commit_msg>Maintenance: Ensure that the window of the different browsers has the same and consistent size to avoid diverging behavior.<commit_after>require_relative './set_up'

RSpec.configure do |config|
  config.before(:each, type: :system) do

    Capybara.register_server :puma_wrapper do |app, port, host, **_options|

      # update fqdn Setting according to random assigned Rack server port
      Setting.set('fqdn', "#{host}:#{port}")

      # start a silenced Puma as application server
      Capybara.servers[:puma].call(app, port, host, { Silent: true, Host: '0.0.0.0', Threads: '0:16' })
    end
    Capybara.server = :puma_wrapper

    # set the Host from gather container IP for CI runs
    if ENV['CI'].present?
      ip_address = Socket.ip_address_list.detect(&:ipv4_private?).ip_address
      host!("http://#{ip_address}")
    end

    # set custom Zammad driver (e.g. zammad_chrome) for special
    # functionalities and CI requirements
    driven_by(:"zammad_#{ENV.fetch('BROWSER', 'firefox')}")

    browser_width  = ENV['BROWSER_WIDTH'] || 1024
    browser_height = ENV['BROWSER_HEIGHT'] || 800
    page.driver.browser.manage.window.resize_to(browser_width, browser_height)
  end
end
{'fraction_non_alphanumeric': 0.12595419847328243, 'fraction_numerical': 0.01097328244274809, 'mean_word_length': 3.8654292343387473, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7640348', 'n_tokens_mistral': 702, 'n_tokens_neox': 680, 'n_words': 183}