Fixture pipelines/pipelines.json does not contain any stage

Description

In the test spec/frontend/pipelines/pipelines_table_row_spec.js the mock data for the pipeline that is loaded comes from: getJSONFixture('pipelines/pipelines.json').

However, this fixture does not contain any stages, so some of the tests are not testing anything, for example pipeline.details.stages is actually only [], so the following test does not test anything:

    it('should render an icon for each stage', () => {
      expect(
        wrapper.findAll('.table-section:nth-child(4) [data-testid="mini-pipeline-graph-dropdown-toggle"]').length,
      ).toEqual(pipeline.details.stages.length);
    });

Discussion

The following discussion from !53017 (merged) should be addressed:

  • @mrincon started a discussion:

    To follow up: This test passes because the pipeline has 0 stages, so no icon is actually shown. I would like to address this is a follow up.