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
95
95
::Rails . application
96
96
end
97
97
98
+ DEFAULT_DRIVER =
99
+ if ::Rails ::VERSION ::STRING . to_f >= 7.2
100
+ :selenium_chrome_headless
101
+ else
102
+ :selenium
103
+ end
104
+
98
105
included do |other |
99
106
ActiveSupport . on_load ( :action_dispatch_system_test_case ) do
100
107
ActionDispatch ::SystemTesting ::Server . silence_puma = true
@@ -137,11 +144,7 @@ def initialize(*args, &blk)
137
144
self . class . before do
138
145
# A user may have already set the driver, so only default if driver
139
146
# 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
145
148
end
146
149
end
147
150
You can’t perform that action at this time.
0 commit comments