diff options
Diffstat (limited to 'spec/frontend/pipeline_editor/mock_data.js')
-rw-r--r-- | spec/frontend/pipeline_editor/mock_data.js | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/spec/frontend/pipeline_editor/mock_data.js b/spec/frontend/pipeline_editor/mock_data.js index 4d4a8c21d78..f2104f25324 100644 --- a/spec/frontend/pipeline_editor/mock_data.js +++ b/spec/frontend/pipeline_editor/mock_data.js @@ -156,30 +156,43 @@ export const mergeUnwrappedCiConfig = (mergedConfig) => { }; }; -export const mockNewCommitShaResults = { +export const mockCommitShaResults = { data: { project: { - pipelines: { - nodes: [ - { - id: 'gid://gitlab/Ci::Pipeline/1', - sha: 'd0d56d363d8a3f67a8ab9fc00207d468f30032ca', - path: `/${mockProjectFullPath}/-/pipelines/488`, - commitPath: `/${mockProjectFullPath}/-/commit/d0d56d363d8a3f67a8ab9fc00207d468f30032ca`, + repository: { + tree: { + lastCommit: { + sha: mockCommitSha, }, - { - id: 'gid://gitlab/Ci::Pipeline/2', - sha: 'fcab2ece40b26f428dfa3aa288b12c3c5bdb06aa', - path: `/${mockProjectFullPath}/-/pipelines/487`, - commitPath: `/${mockProjectFullPath}/-/commit/fcab2ece40b26f428dfa3aa288b12c3c5bdb06aa`, + }, + }, + }, + }, +}; + +export const mockNewCommitShaResults = { + data: { + project: { + repository: { + tree: { + lastCommit: { + sha: 'eeff1122', }, - { - id: 'gid://gitlab/Ci::Pipeline/3', - sha: '6c16b17c7f94a438ae19a96c285bb49e3c632cf4', - path: `/${mockProjectFullPath}/-/pipelines/433`, - commitPath: `/${mockProjectFullPath}/-/commit/6c16b17c7f94a438ae19a96c285bb49e3c632cf4`, + }, + }, + }, + }, +}; + +export const mockEmptyCommitShaResults = { + data: { + project: { + repository: { + tree: { + lastCommit: { + sha: '', }, - ], + }, }, }, }, |