Skip to content

Commit 8ae739b

Browse files
Merge pull request #274 from marcoroth/tests_macos
Adds note for running tests on macOS
2 parents 3982de3 + 0a0b495 commit 8ae739b

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ group :development, :test do
3232
gem 'simplecov', require: false, group: :test
3333
gem 'byebug'
3434
gem 'webmock'
35+
gem 'webdrivers', '~> 4.1'
3536
end
3637

3738
group :test do

Gemfile.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ GEM
231231
tzinfo (1.2.5)
232232
thread_safe (~> 0.1)
233233
uber (0.1.0)
234+
webdrivers (4.1.2)
235+
nokogiri (~> 1.6)
236+
rubyzip (~> 1.0)
237+
selenium-webdriver (>= 3.0, < 4.0)
234238
webmock (3.5.1)
235239
addressable (>= 2.3.6)
236240
crack (>= 0.3.2)
@@ -264,6 +268,7 @@ DEPENDENCIES
264268
trailblazer
265269
trailblazer-cells
266270
trailblazer-rails
271+
webdrivers (~> 4.1)
267272
webmock
268273
webpacker (~> 3.5)
269274

docs/contribute/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,26 @@ bundle exec rspec
5555

5656
Tests follow quite the same rules as the documentation: Make sure to either add relevant tests (when introducing new concepts or components) or change existing ones to fit your changes (updating existing concepts and components). Pull requests that add/change concepts & components and do not come with corresponding tests will not be approved.
5757

58+
### Note: Running tests on macOS
59+
60+
Make sure you have installed `chromedriver` on your machine. You can install `chromedriver` via `brew` with
61+
62+
```shell
63+
brew cask install chromedriver
64+
```
65+
66+
You can then run your the testsuite with `bundle exec rspec`.
67+
68+
If you get an error about a version mismatch similar to this one:
69+
70+
`Chrome version must be between X and Y (Driver info: chromedriver=X.Y.Z)`
71+
72+
Make sure you update your chromedriver by executing this command in the project root:
73+
74+
```shell
75+
rails app:webdrivers:chromedriver:update
76+
```
77+
5878
## Release
5979

6080
Webpacker is used for managing all JS assets. In order to deploy a packed JS, we use a "builder" app found in `repo_root/builder`. This builder app uses a symlink in order to reference the actual core found in `builder/vendor`.

0 commit comments

Comments
 (0)