Merge branch 'es6-es5-poltergeist' into 'master'

Document Capybara errors from es6 in es5 file.

## What does this MR do?

Documents an error that I've banged my head against twice now. 

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

The greater good. 

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request !6836
This commit is contained in:
Fatih Acet 2016-10-12 21:44:07 +00:00
commit 21e3712a07
1 changed files with 11 additions and 0 deletions

View File

@ -223,3 +223,14 @@ For our currently-supported browsers, see our [requirements][requirements].
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
[scss-style-guide]: scss_styleguide.md
[requirements]: ../install/requirements.md#supported-web-browsers
## Common Errors
### Rspec (Capybara/Poltergeist) chokes on general JavaScript errors
If you see very generic JavaScript errors (e.g. `jQuery is undefined`) being thrown in tests, but
can't reproduce them manually, you may have included `ES6`-style JavaScript in files that don't
have the `.js.es6` file extension. Either use ES5-friendly JavaScript or rename the file you're
working in (`git mv <file>.js> <file.js.es6>`).