Broken master: jest failure in ee/spec/frontend/dependencies/components/app_spec.js

From https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/265109685:

Summary of all failing tests
FAIL ee/spec/frontend/dependencies/components/app_spec.js
  ● DependenciesApp component with dependencyListVulnerabilities feature flag enabled › on creation › given a list of dependencies and ok report › displays the tabs correctly

    [vue-test-utils]: no item exists at 0

      387 |         const tabs = findTabControls();
      388 |         expected.forEach(({ text, total }, i) => {
    > 389 |           const tab = tabs.at(i);
          |                            ^
      390 |           expect(tab.text()).toEqual(expect.stringContaining(text));
      391 |           expect(
      392 |             tab

      at throwError (node_modules/@vue/test-utils/dist/vue-test-utils.js:11:9)
      at WrapperArray.at (node_modules/@vue/test-utils/dist/vue-test-utils.js:410:5)
      at at (ee/spec/frontend/dependencies/components/app_spec.js:389:28)
          at Array.forEach (<anonymous>)
      at Object.forEach (ee/spec/frontend/dependencies/components/app_spec.js:388:18)

  ● DependenciesApp component with dependencyListVulnerabilities feature flag enabled › on creation › given a list of dependencies and ok report › given the user clicks on the vulnerable tab › changes the current list

    [vue-test-utils]: no item exists at 1

      310 |   const findDependenciesTables = () => wrapper.findAll(PaginatedDependenciesTable);
      311 |   const findTabControls = () => wrapper.findAll('.js-tab');
    > 312 |   const findVulnerableTabControl = () => findTabControls().at(1);
          |                                                            ^
      313 |   const findVulnerableTabComponent = () => wrapper.findAll(GlTab).at(1);
      314 | 
      315 |   const expectComponentWithProps = (Component, props = {}) => {

      at throwError (node_modules/@vue/test-utils/dist/vue-test-utils.js:11:9)
      at WrapperArray.at (node_modules/@vue/test-utils/dist/vue-test-utils.js:410:5)
      at at (ee/spec/frontend/dependencies/components/app_spec.js:312:60)
      at Object.findVulnerableTabControl (ee/spec/frontend/dependencies/components/app_spec.js:406:11)

  ● DependenciesApp component with dependencyListVulnerabilities feature flag enabled › on creation › given a list of dependencies and ok report › given the user clicks on the vulnerable tab › changes the current list

    expect(jest.fn()).toHaveBeenCalledWith(expected)

    Expected mock function to have been called with:
      "setCurrentList"
    as argument 1, but it was called with
      "fetchDependencies".
      "vulnerableDependencies"
    as argument 2, but it was called with
      undefined.

    Difference:

      Comparing two different types of values. Expected string but received undefined.

      "setCurrentList"
    as argument 1, but it was called with
      "setDependenciesEndpoint".
      "vulnerableDependencies"
    as argument 2, but it was called with
      "/foo".

      410 | 
      411 |         it('changes the current list', () => {
    > 412 |           expect(store.dispatch).toHaveBeenCalledWith('setCurrentList', vulnerableNamespace);
          |                                  ^
      413 |         });
      414 |       });
      415 | 

      at Object.toHaveBeenCalledWith (ee/spec/frontend/dependencies/components/app_spec.js:412:34)

  ● DependenciesApp component with dependencyListVulnerabilities feature flag enabled › on creation › given a list of dependencies and ok report › given there are no vulnerable dependencies › disables the vulnerable tab

    expect(received).toEqual(expected) // deep equality

    - Expected
    + Received

    - ObjectContaining {
    -   "disabled": true,
    - }
    + Object {}

      436 | 
      437 |         it('disables the vulnerable tab', () => {
    > 438 |           expect(findVulnerableTabComponent().props()).toEqual(
          |                                                        ^
      439 |             expect.objectContaining({
      440 |               disabled: true,
      441 |             }),

      at Object.toEqual (ee/spec/frontend/dependencies/components/app_spec.js:438:56)


Test Suites: 1 failed, 340 passed, 341 total
Tests:       3 failed, 3022 passed, 3025 total
Snapshots:   102 passed, 102 total
Time:        348.561s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Assignee Loading
Time tracking Loading