diff options
Diffstat (limited to 'spec/frontend/pipeline_wizard/mock/query_responses.js')
-rw-r--r-- | spec/frontend/pipeline_wizard/mock/query_responses.js | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/spec/frontend/pipeline_wizard/mock/query_responses.js b/spec/frontend/pipeline_wizard/mock/query_responses.js new file mode 100644 index 00000000000..95dcb881a04 --- /dev/null +++ b/spec/frontend/pipeline_wizard/mock/query_responses.js @@ -0,0 +1,62 @@ +export const createCommitMutationResult = { + data: { + commitCreate: { + commit: { + id: '82a9df1', + }, + content: 'foo: bar', + errors: null, + }, + }, +}; + +export const createCommitMutationErrorResult = { + data: { + commitCreate: { + commit: null, + content: null, + errors: ['Some Error Message'], + }, + }, +}; + +export const fileQueryResult = { + data: { + project: { + id: 'gid://gitlab/Project/1', + repository: { + blobs: { + nodes: [ + { + id: 'gid://gitlab/Blob/9ff96777b315cd37188f7194d8382c718cb2933c', + }, + ], + }, + }, + }, + }, +}; + +export const fileQueryEmptyResult = { + data: { + project: { + id: 'gid://gitlab/Project/2', + repository: { + blobs: { + nodes: [], + }, + }, + }, + }, +}; + +export const fileQueryErrorResult = { + data: { + foo: 'bar', + project: { + id: null, + repository: null, + }, + }, + errors: [{ message: 'GraphQL Error' }], +}; |