diff options
Diffstat (limited to 'spec/frontend/jobs/mock_data.js')
-rw-r--r-- | spec/frontend/jobs/mock_data.js | 84 |
1 files changed, 46 insertions, 38 deletions
diff --git a/spec/frontend/jobs/mock_data.js b/spec/frontend/jobs/mock_data.js index 2be78bac8a9..73b9df1853d 100644 --- a/spec/frontend/jobs/mock_data.js +++ b/spec/frontend/jobs/mock_data.js @@ -1214,6 +1214,11 @@ export const mockPipelineWithoutMR = { }, }; +export const mockPipelineWithoutRef = { + ...mockPipelineWithoutMR, + ref: null, +}; + export const mockPipelineWithAttachedMR = { id: 28029444, details: { @@ -1579,44 +1584,6 @@ export const mockJobsQueryResponse = { }, }; -export const mockJobsQueryResponseLastPage = { - data: { - project: { - id: '1', - jobs: { - ...mockJobsQueryResponse.data.project.jobs, - pageInfo: { - endCursor: 'eyJpZCI6IjIzMTcifQ', - hasNextPage: false, - hasPreviousPage: true, - startCursor: 'eyJpZCI6IjIzMzYifQ', - __typename: 'PageInfo', - }, - }, - __typename: 'Project', - }, - }, -}; - -export const mockJobsQueryResponseFirstPage = { - data: { - project: { - id: '1', - jobs: { - ...mockJobsQueryResponse.data.project.jobs, - pageInfo: { - endCursor: 'eyJpZCI6IjIzMTcifQ', - hasNextPage: true, - hasPreviousPage: false, - startCursor: 'eyJpZCI6IjIzMzYifQ', - __typename: 'PageInfo', - }, - }, - __typename: 'Project', - }, - }, -}; - export const mockJobsQueryEmptyResponse = { data: { project: { @@ -1910,3 +1877,44 @@ export const cannotPlayScheduledJob = { __typename: 'JobPermissions', }, }; + +export const CIJobConnectionIncomingCache = { + __typename: 'CiJobConnection', + pageInfo: { + __typename: 'PageInfo', + endCursor: 'eyJpZCI6IjIwNTEifQ', + hasNextPage: true, + hasPreviousPage: false, + startCursor: 'eyJpZCI6IjIxNzMifQ', + }, + nodes: [ + { __ref: 'CiJob:gid://gitlab/Ci::Build/2057' }, + { __ref: 'CiJob:gid://gitlab/Ci::Build/2056' }, + { __ref: 'CiJob:gid://gitlab/Ci::Build/2051' }, + ], +}; + +export const CIJobConnectionIncomingCacheRunningStatus = { + __typename: 'CiJobConnection', + pageInfo: { + __typename: 'PageInfo', + endCursor: 'eyJpZCI6IjIwNTEifQ', + hasNextPage: true, + hasPreviousPage: false, + startCursor: 'eyJpZCI6IjIxNzMifQ', + }, + nodes: [ + { __ref: 'CiJob:gid://gitlab/Ci::Build/2000' }, + { __ref: 'CiJob:gid://gitlab/Ci::Build/2001' }, + { __ref: 'CiJob:gid://gitlab/Ci::Build/2002' }, + ], +}; + +export const CIJobConnectionExistingCache = { + nodes: [ + { __ref: 'CiJob:gid://gitlab/Ci::Build/2057' }, + { __ref: 'CiJob:gid://gitlab/Ci::Build/2056' }, + { __ref: 'CiJob:gid://gitlab/Ci::Build/2051' }, + ], + statuses: 'PENDING', +}; |