Created
May 11, 2020 16:19
-
-
Save scottwillson/588a879112449714ba06cf8ddc8b4ccc to your computer and use it in GitHub Desktop.
Rails 6 system test download directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "test_helper" | |
# Send downloads to tmp/capybara/downloads so they can be reliably checked and cleaned up | |
# without polluting ~/Downloads. | |
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase | |
driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400] do |driver_option| | |
driver_option.add_preference( | |
:download, | |
default_directory: Rails.root.join("tmp/capybara/downloads") | |
) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment