debian-mirror-gitlab/spec/frontend_integration
Pirate Praveen 271ccb9124 New upstream version 16.0.7+ds1 2023-07-09 08:55:56 +05:30
..
content_editor New upstream version 16.0.7+ds1 2023-07-09 08:55:56 +05:30
diffs New upstream version 15.5.4+ds1 2022-11-25 23:54:43 +05:30
ide New upstream version 15.11.6+ds1 2023-06-20 00:43:36 +05:30
lib/utils New upstream version 15.0.4+ds1 2022-07-16 19:58:13 +02:00
snippets New upstream version 15.11.6+ds1 2023-06-20 00:43:36 +05:30
test_helpers New upstream version 15.9.2+ds1 2023-04-23 21:23:45 +05:30
.eslintrc.yml New upstream version 13.7.7 2021-02-22 17:27:13 +05:30
README.md New upstream version 16.0.7+ds1 2023-07-09 08:55:56 +05:30
fixture_generators.yml New upstream version 14.4.2+ds1 2021-11-18 22:05:49 +05:30
fly_out_nav_browser_spec.js New upstream version 15.3.1+ds1 2022-08-27 11:52:29 +05:30
test_setup.js New upstream version 13.3.8 2020-10-24 23:57:45 +05:30

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

You can also download those fixtures from the package registry: see download fixtures for more info.

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