diff options
| author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-02 16:18:21 +0800 |
|---|---|---|
| committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-02 16:18:21 +0800 |
| commit | 80032a84dcaa06774a553863c48f011c3ec53367 (patch) | |
| tree | c6e4b287cb7f4f213faa7ffa5e915c7d479a6918 /doc/development/frontend.md | |
| parent | e90a555745fd99673916038ae053879a45462a6f (diff) | |
| parent | 90072d61e167915a95c26a9af438ef5b6f1f0b03 (diff) | |
| download | gitlab-ce-80032a84dcaa06774a553863c48f011c3ec53367.tar.gz | |
Merge remote-tracking branch 'upstream/master' into pipeline-notifications
* upstream/master: (216 commits)
Remove invalid changelog entries
require rails/generators for generators
Adds variable. Fixes changelog
Fix haml_lint
Fixes after review
Update changelog
Remove tooltips from project header
Makes table pagination responsive
23545 Fix distorted project and group avatars
Fix spinach tests
Update links in side nav and header
Allow to search for user by secondary email address in the admin interface
Rename :name search parameter to :search_query at /admin/users
Initialize Sidekiq with the list of queues used by GitLab
Fix project features default values
Add a link to the Issue Boards API in main README
Add validation errors to Merge Request form
Fix Markdown styling inside reference links
Fix relative links in Markdown wiki when displayed in "Project" tab
Adds label description to issue board title
...
Diffstat (limited to 'doc/development/frontend.md')
| -rw-r--r-- | doc/development/frontend.md | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/doc/development/frontend.md b/doc/development/frontend.md index 56c8516508e..ece8f880542 100644 --- a/doc/development/frontend.md +++ b/doc/development/frontend.md @@ -185,6 +185,20 @@ again in the future. See [the Testing Standards and Style Guidelines](testing.md) for more information. +### Running frontend tests + +`rake teaspoon` runs the frontend-only (JavaScript) tests. +It consists of two subtasks: + +- `rake teaspoon:fixtures` (re-)generates fixtures +- `rake teaspoon:tests` actually executes the tests + +As long as the fixtures don't change, `rake teaspoon:tests` is sufficient +(and saves you some time). + +Please note: Not all of the frontend fixtures are generated. Some are still static +files. These will not be touched by `rake teaspoon:fixtures`. + ## Supported browsers For our currently-supported browsers, see our [requirements][requirements]. @@ -224,13 +238,18 @@ For our currently-supported browsers, see our [requirements][requirements]. [scss-style-guide]: scss_styleguide.md [requirements]: ../install/requirements.md#supported-web-browsers -## Common Errors +## Gotchas -### Rspec (Capybara/Poltergeist) chokes on general JavaScript errors +### Phantom.JS (used by Teaspoon & Rspec) chokes, returning vague 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>`). +working in (`git mv <file.js> <file.js.es6>`). + +Similar errors will be thrown if you're using +any of the [array methods introduced in ES6](http://www.2ality.com/2014/05/es6-array-methods.html) +whether or not you've updated the file extension. + |
