Skip to content

Remove loadHTMLloader via setHTMLloader for files with name U

Context

In !74003 (merged), we introduced a CI/CD mechanism to run JS tests when backend changes were made by relying on frontend fixtures.

More specifically, we rely on Jest's --findRelatedTests flag by passing fixtures files to the list of source files . See an example at https://gitlab.com/gitlab-org/gitlab/-/jobs/3097610850#L63 (search for tmp/tests/frontend/fixtures-ee/).

When running predictive tests in the CI, we rely on Jest's --findRelatedTests flag by passing fixtures files to the list of source files . See an example at https://gitlab.com/gitlab-org/gitlab/-/jobs/3097610850#L63 (search for tmp/tests/frontend/fixtures-ee/).

When we dynamically load fixtures with loadHTMLFixture, Jest cannot find tests that are related to the fixture that was modified.

What does this MR do?

The goal of this MR is to prevent future broken master incidents like #375620 (closed).

Linked to Issue: #405314 (closed)

  1. Statically load HTML fixtures
  2. Ensure that HTML fixtures are also considered by jest --findRelatedTests

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading