File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,13 @@ def app
9595 ::Rails . application
9696 end
9797
98+ DEFAULT_DRIVER =
99+ if ::Rails ::VERSION ::STRING . to_f >= 7.2
100+ :selenium_chrome_headless
101+ else
102+ :selenium
103+ end
104+
98105 included do |other |
99106 ActiveSupport . on_load ( :action_dispatch_system_test_case ) do
100107 ActionDispatch ::SystemTesting ::Server . silence_puma = true
@@ -137,11 +144,7 @@ def initialize(*args, &blk)
137144 self . class . before do
138145 # A user may have already set the driver, so only default if driver
139146 # is not set
140- if ::Rails ::VERSION ::STRING . to_f >= 7.2
141- driven_by ( :selenium_chrome_headless ) unless @driver
142- else
143- driven_by ( :selenium ) unless @driver
144- end
147+ driven_by ( DEFAULT_DRIVER ) unless @driver
145148 end
146149 end
147150
You can’t perform that action at this time.
0 commit comments