diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/frontend/design_management/mock_data/apollo_mock.js | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/frontend/design_management/mock_data/apollo_mock.js')
-rw-r--r-- | spec/frontend/design_management/mock_data/apollo_mock.js | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/spec/frontend/design_management/mock_data/apollo_mock.js b/spec/frontend/design_management/mock_data/apollo_mock.js new file mode 100644 index 00000000000..5e2df3877a5 --- /dev/null +++ b/spec/frontend/design_management/mock_data/apollo_mock.js @@ -0,0 +1,106 @@ +export const designListQueryResponse = { + data: { + project: { + id: '1', + issue: { + designCollection: { + designs: { + nodes: [ + { + id: '1', + event: 'NONE', + filename: 'fox_1.jpg', + notesCount: 3, + image: 'image-1', + imageV432x230: 'image-1', + }, + { + id: '2', + event: 'NONE', + filename: 'fox_2.jpg', + notesCount: 2, + image: 'image-2', + imageV432x230: 'image-2', + }, + { + id: '3', + event: 'NONE', + filename: 'fox_3.jpg', + notesCount: 1, + image: 'image-3', + imageV432x230: 'image-3', + }, + ], + }, + versions: { + nodes: [], + }, + }, + }, + }, + }, +}; + +export const permissionsQueryResponse = { + data: { + project: { + id: '1', + issue: { + userPermissions: { createDesign: true }, + }, + }, + }, +}; + +export const reorderedDesigns = [ + { + id: '2', + event: 'NONE', + filename: 'fox_2.jpg', + notesCount: 2, + image: 'image-2', + imageV432x230: 'image-2', + }, + { + id: '1', + event: 'NONE', + filename: 'fox_1.jpg', + notesCount: 3, + image: 'image-1', + imageV432x230: 'image-1', + }, + { + id: '3', + event: 'NONE', + filename: 'fox_3.jpg', + notesCount: 1, + image: 'image-3', + imageV432x230: 'image-3', + }, +]; + +export const moveDesignMutationResponse = { + data: { + designManagementMove: { + designCollection: { + designs: { + nodes: [...reorderedDesigns], + }, + }, + errors: [], + }, + }, +}; + +export const moveDesignMutationResponseWithErrors = { + data: { + designManagementMove: { + designCollection: { + designs: { + nodes: [...reorderedDesigns], + }, + }, + errors: ['Houston, we have a problem'], + }, + }, +}; |