Commit c2a7b82
authored
Use headless driver for next Rails release (#2746)
* Use headless driver for next Rails release
In the next release of Rails, the default driver was switched from
`:chrome` to `:headless_chrome` as see in: rails/rails#50512
This is to ensure the new [ci template][] will "work out of the box".
However, this will not work with applications using `rspec-rails`, since
it still defaults to `:selenium`. Instead, GitHub actions will fail with
the following error:
```
Selenium::WebDriver::Error::SessionNotCreatedError:
session not created: Chrome failed to start: exited normally.
(session not created: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
```
[ci template]: https://github.com/rails/rails/blob/main/railties/lib/rails/generators/rails/app/templates/github/ci.yml.tt1 parent ed3adba commit c2a7b82
File tree
2 files changed
+16
-2
lines changed- lib/rspec/rails/example
- spec/rspec/rails/example
2 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
| |||
0 commit comments