gitlab-org--gitlab-foss/spec/frontend_integration
GitLab Bot 7ff36fc6e9 Add latest changes from gitlab-org/gitlab@master 2022-05-16 18:09:11 +00:00
..
content_editor Add latest changes from gitlab-org/gitlab@master 2022-03-23 12:07:27 +00:00
diffs Add latest changes from gitlab-org/gitlab@master 2021-07-27 12:10:54 +00:00
ide Add latest changes from gitlab-org/gitlab@master 2022-05-16 18:09:11 +00:00
lib/utils Add latest changes from gitlab-org/gitlab@master 2022-05-13 12:08:49 +00:00
test_helpers Add latest changes from gitlab-org/gitlab@master 2021-11-23 12:14:32 +00:00
.eslintrc.yml Add latest changes from gitlab-org/gitlab@master 2020-11-25 06:09:20 +00:00
README.md Add latest changes from gitlab-org/gitlab@master 2021-09-14 03:11:17 +00:00
fixture_generators.yml Add latest changes from gitlab-org/gitlab@master 2021-09-30 18:11:31 +00:00
fly_out_nav_browser_spec.js Add latest changes from gitlab-org/gitlab@master 2022-04-20 18:11:54 +00:00
test_setup.js Add latest changes from gitlab-org/gitlab@master 2020-08-06 21:10:15 +00:00

README.md

Frontend Integration Specs

This directory contains Frontend integration specs. Go to spec/frontend if you're looking for Frontend unit tests.

Frontend integration specs:

  • Mock out the Backend.
  • Don't test individual components, but instead test use cases.
  • Are expected to run slower than unit tests.
  • Could end up having their own environment.

As a result, they deserve their own special place.

Run frontend integration tests locally

The frontend integration specs are all about testing integration frontend bundles against a mock backend. The mock backend is built using the fixtures and GraphQL schema.

We can generate the necessary fixtures and GraphQL schema by running:

bundle exec rake frontend:fixtures gitlab:graphql:schema:dump

Then we can use Jest to run the frontend integration tests:

yarn jest:integration <path-to-integration-test>

If you'd like to run the frontend integration specs without setting up the fixtures first, then you can set GL_IGNORE_WARNINGS=1:

GL_IGNORE_WARNINGS=1 yarn jest:integration <path-to-integration-test>

The jest-integration job executes the frontend integration tests in our CI/CD pipelines.

References