Skip to content

Commit 63cbdda

Browse files
committed
travis runs poltergeist_errors_ok
1 parent fa19c23 commit 63cbdda

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ before_script:
3838

3939
script:
4040
- bundle exec rake db:schema:load
41-
- bundle exec rake
41+
- DRIVER=poltergeist_errors_ok bundle exec rake

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ See package.json and Gemfile for versions
114114

115115
## Javascript development without Rails: using the Webpack Dev Server
116116

117+
We include a sample setup for developing your JavaScript files without Rails. However, this is no longer recommended as it's best to create your APIs in Rails, and take advantage of the hot reloading of your react components provided by this project.
118+
117119
1. Run the node server with file `server-express.js` with command `npm run` or `cd client && node server-express.js`.
118120
2. Point your browser to [http://localhost:4000](http://localhost:4000)
119121

@@ -141,6 +143,9 @@ Save a change to a JSX file and see it update immediately in the browser! Note,
141143
<%= env_javascript_include_tag(static: 'application_static', hot: 'application_non_webpack', options: { 'data-turbolinks-track' => true }) %>
142144
```
143145

146+
## Testing
147+
148+
+ Be sure to see [Integration Test Notes](./docs/integration-test-notes.md) for advice on running your integration tests.
144149

145150
+ **Testing Mode**: When running tests, it is useful to run `foreman start -f Procfile.spec` in order to have webpack automatically recompile the static bundles. Rspec is configured to automatically check whether or not this process is running. If it is not, it will automatically rebuild the webpack bundle to ensure you are not running tests on stale client code. This is achieved via the `ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)`
146151
line in the `rails_helper.rb` file. If you are using this project as an example and are not using RSpec, you may want to implement similar logic in your own project.

docs/integration-test-notes.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Integration Test Notes
2+
3+
4+
## Driver Options
5+
The current default driver is selenium chrome.
6+
7+
Support is included for the following drivers:
8+
9+
1. Selenium Chrome (`DRIVER=selenium_chrome rspec`)
10+
1. Selenium Firefox (`DRIVER=selenium_firefox rspec`)
11+
1. Poltergeist (`DRIVER=poltergeist rspec`)
12+
1. Poltergeist no animations (`DRIVER=poltergeist_no_animations rspec`)
13+
1. Poltergeist errors ok (`DRIVER=poltergeist_errors_ok rspec`)
14+
15+
You may want to experiment with using the different drivers.
16+
17+
## Rspec-retry
18+
* The current retry count is 4, configured in spec_helper.rb.
19+
* When developing new tests, you do not want retry a failure multiple times.
20+
* Set this env value: `export RSPEC_RETRY_RETRY_COUNT=1`
21+
22+
## Selenium Chrome
23+
24+
You may want to see the [chromedriver-helper docs](https://github.com/flavorjones/chromedriver-helper) and run chromedriver-update to get the latest version of the Chrome driver.
25+
26+
27+
## Poltergeist
28+
29+
Poltergeist is awesome because it will crash on JS Errors. Poltergeist is not aswesome because phantomjs is currently having race conditions on crashing a lot.
30+
31+
### 2016-11-25
32+
Polteregeist is consistently crashing due to [issue 830](https://github.com/teampoltergeist/poltergeist/issues/830) and [issue 232](https://github.com/teampoltergeist/poltergeist/issues/232). Hopefully, this will be fixed in the future.
33+
34+
`support/poltergeist.rb:34` contains code to restart phantomjs with the hopes that this will cause a failing test to pass.

0 commit comments

Comments
 (0)