Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mock_data.js « merge_requests « ci « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1d8fdb88aa3de8a7014555571eff6be7a6dc5531 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const createMergeRequestPipelines = (count = 30) => {
  const pipelines = [];

  for (let i = 0; i < count; i += 1) {
    pipelines.push({
      id: i,
      iid: i + 10,
      path: `/project/pipelines/${i}`,
    });
  }

  return {
    count,
    nodes: pipelines,
  };
};

export const mergeRequestPipelinesResponse = {
  data: {
    project: {
      __typename: 'Project',
      id: 'gid://gitlab/Project/1',
      mergeRequest: {
        __typename: 'MergeRequest',
        id: 'gid://gitlab/MergeRequest/1',
        pipelines: createMergeRequestPipelines(),
      },
    },
  },
};