debian-mirror-gitlab/spec/frontend/work_items/mock_data.js

81 lines
1.7 KiB
JavaScript
Raw Normal View History

2021-12-11 22:18:48 +05:30
export const workItemQueryResponse = {
workItem: {
2022-05-07 20:08:51 +05:30
__typename: 'WorkItem',
2021-12-11 22:18:48 +05:30
id: '1',
2022-05-07 20:08:51 +05:30
title: 'Test',
workItemType: {
__typename: 'WorkItemType',
id: 'work-item-type-1',
},
2021-12-11 22:18:48 +05:30
widgets: {
2022-01-26 12:08:38 +05:30
__typename: 'LocalWorkItemWidgetConnection',
2021-12-11 22:18:48 +05:30
nodes: [
{
2022-01-26 12:08:38 +05:30
__typename: 'LocalTitleWidget',
2021-12-11 22:18:48 +05:30
type: 'TITLE',
contentText: 'Test',
},
],
},
},
};
2022-01-26 12:08:38 +05:30
export const updateWorkItemMutationResponse = {
2022-05-07 20:08:51 +05:30
data: {
workItemUpdate: {
__typename: 'LocalUpdateWorkItemPayload',
workItem: {
__typename: 'LocalWorkItem',
id: '1',
title: 'Updated title',
workItemType: {
__typename: 'WorkItemType',
id: 'work-item-type-1',
2022-01-26 12:08:38 +05:30
},
2022-05-07 20:08:51 +05:30
widgets: {
__typename: 'LocalWorkItemWidgetConnection',
nodes: [
{
__typename: 'LocalTitleWidget',
type: 'TITLE',
enabled: true,
contentText: 'Updated title',
},
],
},
},
2022-01-26 12:08:38 +05:30
},
},
};
2022-04-04 11:22:00 +05:30
export const projectWorkItemTypesQueryResponse = {
data: {
workspace: {
id: '1',
workItemTypes: {
nodes: [
{ id: 'work-item-1', name: 'Issue' },
{ id: 'work-item-2', name: 'Incident' },
],
},
},
},
};
2022-05-07 20:08:51 +05:30
export const createWorkItemMutationResponse = {
data: {
workItemCreate: {
__typename: 'WorkItemCreatePayload',
workItem: {
__typename: 'WorkItem',
id: '1',
title: 'Updated title',
workItemType: {
__typename: 'WorkItemType',
id: 'work-item-type-1',
},
},
},
},
};