2021-12-11 22:18:48 +05:30
|
|
|
export const workItemQueryResponse = {
|
2022-06-21 17:19:12 +05:30
|
|
|
data: {
|
|
|
|
workItem: {
|
|
|
|
__typename: 'WorkItem',
|
|
|
|
id: 'gid://gitlab/WorkItem/1',
|
|
|
|
title: 'Test',
|
2022-07-16 23:28:13 +05:30
|
|
|
state: 'OPEN',
|
|
|
|
description: 'description',
|
2022-06-21 17:19:12 +05:30
|
|
|
workItemType: {
|
|
|
|
__typename: 'WorkItemType',
|
|
|
|
id: 'gid://gitlab/WorkItems::Type/5',
|
|
|
|
name: 'Task',
|
|
|
|
},
|
2022-07-16 23:28:13 +05:30
|
|
|
userPermissions: {
|
|
|
|
deleteWorkItem: false,
|
|
|
|
updateWorkItem: false,
|
|
|
|
},
|
2021-12-11 22:18:48 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2022-01-26 12:08:38 +05:30
|
|
|
|
|
|
|
export const updateWorkItemMutationResponse = {
|
2022-05-07 20:08:51 +05:30
|
|
|
data: {
|
|
|
|
workItemUpdate: {
|
2022-06-21 17:19:12 +05:30
|
|
|
__typename: 'WorkItemUpdatePayload',
|
2022-05-07 20:08:51 +05:30
|
|
|
workItem: {
|
2022-06-21 17:19:12 +05:30
|
|
|
__typename: 'WorkItem',
|
|
|
|
id: 'gid://gitlab/WorkItem/1',
|
2022-05-07 20:08:51 +05:30
|
|
|
title: 'Updated title',
|
2022-07-16 23:28:13 +05:30
|
|
|
state: 'OPEN',
|
|
|
|
description: 'description',
|
2022-05-07 20:08:51 +05:30
|
|
|
workItemType: {
|
|
|
|
__typename: 'WorkItemType',
|
2022-06-21 17:19:12 +05:30
|
|
|
id: 'gid://gitlab/WorkItems::Type/5',
|
|
|
|
name: 'Task',
|
2022-05-07 20:08:51 +05:30
|
|
|
},
|
2022-07-16 23:28:13 +05:30
|
|
|
userPermissions: {
|
|
|
|
deleteWorkItem: false,
|
|
|
|
updateWorkItem: false,
|
|
|
|
},
|
2022-05-07 20:08:51 +05:30
|
|
|
},
|
2022-01-26 12:08:38 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2022-04-04 11:22:00 +05:30
|
|
|
|
|
|
|
export const projectWorkItemTypesQueryResponse = {
|
|
|
|
data: {
|
|
|
|
workspace: {
|
2022-06-21 17:19:12 +05:30
|
|
|
id: 'gid://gitlab/WorkItem/1',
|
2022-04-04 11:22:00 +05:30
|
|
|
workItemTypes: {
|
|
|
|
nodes: [
|
2022-06-21 17:19:12 +05:30
|
|
|
{ id: 'gid://gitlab/WorkItems::Type/1', name: 'Issue' },
|
|
|
|
{ id: 'gid://gitlab/WorkItems::Type/2', name: 'Incident' },
|
2022-07-16 23:28:13 +05:30
|
|
|
{ id: 'gid://gitlab/WorkItems::Type/3', name: 'Task' },
|
2022-04-04 11:22:00 +05:30
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2022-05-07 20:08:51 +05:30
|
|
|
|
|
|
|
export const createWorkItemMutationResponse = {
|
|
|
|
data: {
|
|
|
|
workItemCreate: {
|
|
|
|
__typename: 'WorkItemCreatePayload',
|
|
|
|
workItem: {
|
|
|
|
__typename: 'WorkItem',
|
2022-06-21 17:19:12 +05:30
|
|
|
id: 'gid://gitlab/WorkItem/1',
|
2022-05-07 20:08:51 +05:30
|
|
|
title: 'Updated title',
|
2022-07-16 23:28:13 +05:30
|
|
|
state: 'OPEN',
|
|
|
|
description: 'description',
|
2022-05-07 20:08:51 +05:30
|
|
|
workItemType: {
|
|
|
|
__typename: 'WorkItemType',
|
2022-06-21 17:19:12 +05:30
|
|
|
id: 'gid://gitlab/WorkItems::Type/5',
|
|
|
|
name: 'Task',
|
2022-05-07 20:08:51 +05:30
|
|
|
},
|
2022-07-16 23:28:13 +05:30
|
|
|
userPermissions: {
|
|
|
|
deleteWorkItem: false,
|
|
|
|
updateWorkItem: false,
|
|
|
|
},
|
2022-05-07 20:08:51 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2022-06-21 17:19:12 +05:30
|
|
|
|
|
|
|
export const createWorkItemFromTaskMutationResponse = {
|
|
|
|
data: {
|
|
|
|
workItemCreateFromTask: {
|
|
|
|
__typename: 'WorkItemCreateFromTaskPayload',
|
|
|
|
errors: [],
|
|
|
|
workItem: {
|
|
|
|
descriptionHtml: '<p>New description</p>',
|
|
|
|
id: 'gid://gitlab/WorkItem/13',
|
|
|
|
__typename: 'WorkItem',
|
2022-07-16 23:28:13 +05:30
|
|
|
userPermissions: {
|
|
|
|
deleteWorkItem: false,
|
|
|
|
updateWorkItem: false,
|
|
|
|
},
|
2022-06-21 17:19:12 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const deleteWorkItemResponse = {
|
|
|
|
data: { workItemDelete: { errors: [], __typename: 'WorkItemDeletePayload' } },
|
|
|
|
};
|
|
|
|
|
|
|
|
export const deleteWorkItemFailureResponse = {
|
|
|
|
data: { workItemDelete: null },
|
|
|
|
errors: [
|
|
|
|
{
|
|
|
|
message:
|
|
|
|
"The resource that you are attempting to access does not exist or you don't have permission to perform this action",
|
|
|
|
locations: [{ line: 2, column: 3 }],
|
|
|
|
path: ['workItemDelete'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
export const workItemTitleSubscriptionResponse = {
|
|
|
|
data: {
|
|
|
|
issuableTitleUpdated: {
|
|
|
|
id: 'gid://gitlab/WorkItem/1',
|
|
|
|
title: 'new title',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|