```ruby
# frozen_string_literal: true

# Miscellaneous things that need to run after each spec.
RSpec.configure do |config|
  config.after(type: :system) do
    # Clear these again after example so we don't leave junk in there after the suite is run.
    clear_downloads
  end
end
```

Add browser log printout for system tests
user
```ruby
# frozen_string_literal: true

# Miscellaneous things that need to run after each spec.
RSpec.configure do |config|
  config.after(type: :system) do
    # Clear these again after example so we don't leave junk in there after the suite is run.
    clear_downloads
  end

  # Print browser logs to console if they are non-empty.
  # You MUST use console.warn or console.error for this to work.
  config.after(:each, type: :system, js: true) do
    logs = page.driver.browser.manage.logs.get(:browser).join("\n")
    unless logs.strip.empty?
      puts("------------ BROWSER LOGS -------------")
      puts(logs)
      puts("---------------------------------------")
    end
  end
end
```
assistant