debian-mirror-gitlab/spec/frontend/design_management/mock_data/apollo_mock.js

175 lines
3.7 KiB
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
export const designListQueryResponse = {
data: {
project: {
2021-01-29 00:20:46 +05:30
__typename: 'Project',
2020-10-24 23:57:45 +05:30
id: '1',
issue: {
2021-01-29 00:20:46 +05:30
__typename: 'Issue',
2020-10-24 23:57:45 +05:30
designCollection: {
2021-01-29 00:20:46 +05:30
__typename: 'DesignCollection',
2021-01-03 14:25:43 +05:30
copyState: 'READY',
2020-10-24 23:57:45 +05:30
designs: {
2021-01-29 00:20:46 +05:30
__typename: 'DesignConnection',
2020-10-24 23:57:45 +05:30
nodes: [
{
2021-01-29 00:20:46 +05:30
__typename: 'Design',
2020-10-24 23:57:45 +05:30
id: '1',
event: 'NONE',
filename: 'fox_1.jpg',
notesCount: 3,
image: 'image-1',
imageV432x230: 'image-1',
2020-11-24 15:15:51 +05:30
currentUserTodos: {
2021-01-29 00:20:46 +05:30
__typename: 'ToDo',
2020-11-24 15:15:51 +05:30
nodes: [],
},
2020-10-24 23:57:45 +05:30
},
{
2021-01-29 00:20:46 +05:30
__typename: 'Design',
2020-10-24 23:57:45 +05:30
id: '2',
event: 'NONE',
filename: 'fox_2.jpg',
notesCount: 2,
image: 'image-2',
imageV432x230: 'image-2',
2020-11-24 15:15:51 +05:30
currentUserTodos: {
2021-01-29 00:20:46 +05:30
__typename: 'ToDo',
2020-11-24 15:15:51 +05:30
nodes: [],
},
2020-10-24 23:57:45 +05:30
},
{
2021-01-29 00:20:46 +05:30
__typename: 'Design',
2020-10-24 23:57:45 +05:30
id: '3',
event: 'NONE',
filename: 'fox_3.jpg',
notesCount: 1,
image: 'image-3',
imageV432x230: 'image-3',
2020-11-24 15:15:51 +05:30
currentUserTodos: {
2021-01-29 00:20:46 +05:30
__typename: 'ToDo',
2020-11-24 15:15:51 +05:30
nodes: [],
},
2020-10-24 23:57:45 +05:30
},
],
},
versions: {
2021-01-29 00:20:46 +05:30
__typename: 'DesignVersion',
2020-10-24 23:57:45 +05:30
nodes: [],
},
},
},
},
},
};
2021-01-03 14:25:43 +05:30
export const designUploadMutationCreatedResponse = {
data: {
designManagementUpload: {
designs: [
{
id: '1',
event: 'CREATION',
filename: 'fox_1.jpg',
},
],
},
},
};
export const designUploadMutationUpdatedResponse = {
data: {
designManagementUpload: {
designs: [
{
id: '1',
event: 'MODIFICATION',
filename: 'fox_1.jpg',
},
],
},
},
};
2020-10-24 23:57:45 +05:30
export const permissionsQueryResponse = {
data: {
project: {
2021-01-29 00:20:46 +05:30
__typename: 'Project',
2020-10-24 23:57:45 +05:30
id: '1',
issue: {
2021-01-29 00:20:46 +05:30
__typename: 'Issue',
userPermissions: { __typename: 'UserPermissions', createDesign: true },
2020-10-24 23:57:45 +05:30
},
},
},
};
export const reorderedDesigns = [
{
2021-01-29 00:20:46 +05:30
__typename: 'Design',
2020-10-24 23:57:45 +05:30
id: '2',
event: 'NONE',
filename: 'fox_2.jpg',
notesCount: 2,
image: 'image-2',
imageV432x230: 'image-2',
2020-11-24 15:15:51 +05:30
currentUserTodos: {
2021-01-29 00:20:46 +05:30
__typename: 'ToDo',
2020-11-24 15:15:51 +05:30
nodes: [],
},
2020-10-24 23:57:45 +05:30
},
{
2021-01-29 00:20:46 +05:30
__typename: 'Design',
2020-10-24 23:57:45 +05:30
id: '1',
event: 'NONE',
filename: 'fox_1.jpg',
notesCount: 3,
image: 'image-1',
imageV432x230: 'image-1',
2020-11-24 15:15:51 +05:30
currentUserTodos: {
2021-01-29 00:20:46 +05:30
__typename: 'ToDo',
2020-11-24 15:15:51 +05:30
nodes: [],
},
2020-10-24 23:57:45 +05:30
},
{
2021-01-29 00:20:46 +05:30
__typename: 'Design',
2020-10-24 23:57:45 +05:30
id: '3',
event: 'NONE',
filename: 'fox_3.jpg',
notesCount: 1,
image: 'image-3',
imageV432x230: 'image-3',
2020-11-24 15:15:51 +05:30
currentUserTodos: {
2021-01-29 00:20:46 +05:30
__typename: 'ToDo',
2020-11-24 15:15:51 +05:30
nodes: [],
},
2020-10-24 23:57:45 +05:30
},
];
export const moveDesignMutationResponse = {
data: {
designManagementMove: {
designCollection: {
2021-01-29 00:20:46 +05:30
__typename: 'DesignCollection',
2020-10-24 23:57:45 +05:30
designs: {
2021-01-29 00:20:46 +05:30
__typename: 'DesignConnection',
2020-10-24 23:57:45 +05:30
nodes: [...reorderedDesigns],
},
},
errors: [],
},
},
};
export const moveDesignMutationResponseWithErrors = {
data: {
designManagementMove: {
designCollection: {
designs: {
nodes: [...reorderedDesigns],
},
},
errors: ['Houston, we have a problem'],
},
},
};