summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcia Ramos <marcia@gitlab.com>2019-01-08 13:04:16 +0000
committerMarcia Ramos <marcia@gitlab.com>2019-01-08 13:04:16 +0000
commit8253a4300e79a581d4afa335af3280ac21b9df63 (patch)
tree28cdc3b748a21fdbfb5caf1d5829a9c201706771
parenta76f41d0d1ba18d14adcfd16dc25557129eca023 (diff)
parent9787bdfd53f1d89be5e8d2277fbb9602415ddd0c (diff)
downloadgitlab-ce-8253a4300e79a581d4afa335af3280ac21b9df63.tar.gz
Merge branch 'winh-run-frontend-tests-docs' into 'master'
Document how to run frontend tests Closes #53757 See merge request gitlab-org/gitlab-ce!24202
-rw-r--r--doc/development/new_fe_guide/development/testing.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/development/new_fe_guide/development/testing.md b/doc/development/new_fe_guide/development/testing.md
index 0d98180add0..e5cccae662f 100644
--- a/doc/development/new_fe_guide/development/testing.md
+++ b/doc/development/new_fe_guide/development/testing.md
@@ -1,19 +1,19 @@
# Overview of Frontend Testing
-Tests relevant for frontend development can be found at two places:
+Tests relevant for frontend development can be found at the following places:
-- `spec/javascripts/` which are run by Karma and contain
+- `spec/javascripts/` which are run by Karma (command: `yarn karma`) and contain
- [frontend unit tests](#frontend-unit-tests)
- [frontend component tests](#frontend-component-tests)
- [frontend integration tests](#frontend-integration-tests)
-- `spec/frontend/` which are run by Jest and contain
+- `spec/frontend/` which are run by Jest (command: `yarn jest`) and contain
- [frontend unit tests](#frontend-unit-tests)
- [frontend component tests](#frontend-component-tests)
- [frontend integration tests](#frontend-integration-tests)
- `spec/features/` which are run by RSpec and contain
- [feature tests](#feature-tests)
-All tests in `spec/javascripts/` will eventually be migrated to `spec/frontend/` (see also [#53757]).
+All tests in `spec/javascripts/` will eventually be migrated to `spec/frontend/` (see also [#52483](https://gitlab.com/gitlab-org/gitlab-ce/issues/52483)).
In addition there were feature tests in `features/` run by Spinach in the past.
These have been removed from our codebase in May 2018 ([#23036](https://gitlab.com/gitlab-org/gitlab-ce/issues/23036)).
@@ -23,8 +23,6 @@ See also:
- [old testing guide](../../testing_guide/frontend_testing.html)
- [notes on testing Vue components](../../fe_guide/vue.html#testing-vue-components)
-[#53757]: https://gitlab.com/gitlab-org/gitlab-ce/issues/53757
-
## Frontend unit tests
Unit tests are on the lowest abstraction level and typically test functionality that is not directly perceivable by a user.
@@ -246,6 +244,8 @@ Their abstraction level is comparable to how a user would interact with the UI.
In contrast to [frontend integration tests](#frontend-integration-tests), feature tests make requests against the real backend instead of using fixtures.
This also implies that database queries are executed which makes this category significantly slower.
+See also the [RSpec testing guidelines](../../testing_guide/best_practices.md#rspec).
+
### When to use feature tests
- use cases that require a backend and cannot be tested using fixtures