File tree Expand file tree Collapse file tree 2 files changed +20
-30
lines changed
Expand file tree Collapse file tree 2 files changed +20
-30
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- Capybara . server = :puma
4- Capybara . default_driver = Capybara . javascript_driver = :cuprite
3+ require 'capybara/cuprite'
4+
5+ Capybara . register_driver ( :capybara_cuprite ) do |app |
6+ browser_options = { } . tap do |opts |
7+ opts [ 'no-sandbox' ] = nil if ENV [ 'DEVEL' ]
8+ end
9+
10+ Capybara ::Cuprite ::Driver . new (
11+ app ,
12+ window_size : [ 1600 , 1280 ] ,
13+ browser_options : browser_options ,
14+ process_timeout : 20 ,
15+ timeout : 20 ,
16+ inspector : true ,
17+ headless : !ENV [ 'CUPRITE_HEADLESS' ] . in? ( %w[ n 0 no false ] )
18+ )
19+ end
20+
21+ # Capybara.server = :puma
22+ Capybara . default_driver = Capybara . javascript_driver = :capybara_cuprite
523
624RSpec . configure do |config |
7- # Make sure this hook runs before others
825 config . prepend_before ( :each , type : :system ) do
9- # Use JS driver always
1026 driven_by Capybara . javascript_driver
1127 end
1228end
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments