Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a5eb8395
Commit
a5eb8395
authored
Dec 12, 2019
by
Brandon Labuschagne
Committed by
Evan Read
Dec 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add running tests to FE tips doc
parent
459285fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
doc/development/new_fe_guide/tips.md
doc/development/new_fe_guide/tips.md
+4
-0
doc/development/testing_guide/frontend_testing.md
doc/development/testing_guide/frontend_testing.md
+19
-0
No files found.
doc/development/new_fe_guide/tips.md
View file @
a5eb8395
...
...
@@ -23,3 +23,7 @@ Your feature flag can now be:
-
[
Deleting a feature flag
](
../../api/features.md#delete-a-feature
)
-
[
Manage feature flags
](
../feature_flags/process.md
)
-
[
Feature flags API
](
../../api/features.md
)
## Running tests locally
This can be done as outlined by the
[
frontend testing guide
](
../testing_guide/frontend_testing.md#running-frontend-tests
)
.
doc/development/testing_guide/frontend_testing.md
View file @
a5eb8395
...
...
@@ -552,6 +552,7 @@ For running the frontend tests, you need the following commands:
-
`rake frontend:fixtures`
(re-)generates
[
fixtures
](
#frontend-test-fixtures
)
.
-
`yarn test`
executes the tests.
-
`yarn jest`
executes only the Jest tests.
As long as the fixtures don't change,
`yarn test`
is sufficient (and saves you some time).
...
...
@@ -593,6 +594,24 @@ glob otherwise your shell may split it into multiple arguments:
yarn karma
-f
'spec/javascripts/ide/**/file_spec.js'
```
It is also possible to target individual Jest / RSpec tests:
```
bash
# Run specific jest file
yarn jest ./path/to/local_spec.js
# Run specific jest folder
yarn jest ./path/to/folder/
# Run all jest files which path contain term
yarn jest term
```
```
bash
# Run specific rspec file
rspec ./path/to/local_spec.rb
# Run specific block within rspec file
rspec ./path/to/local_spec.rb:15
```
## Frontend test fixtures
Code that is added to HAML templates (in
`app/views/`
) or makes Ajax requests to the backend has tests that require HTML or JSON from the backend.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment