Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/work_items/mock_data.js')
-rw-r--r--spec/frontend/work_items/mock_data.js60
1 files changed, 45 insertions, 15 deletions
diff --git a/spec/frontend/work_items/mock_data.js b/spec/frontend/work_items/mock_data.js
index a98722bc465..832795fc4ac 100644
--- a/spec/frontend/work_items/mock_data.js
+++ b/spec/frontend/work_items/mock_data.js
@@ -1,8 +1,12 @@
export const workItemQueryResponse = {
workItem: {
- __typename: 'LocalWorkItem',
+ __typename: 'WorkItem',
id: '1',
- type: 'FEATURE',
+ title: 'Test',
+ workItemType: {
+ __typename: 'WorkItemType',
+ id: 'work-item-type-1',
+ },
widgets: {
__typename: 'LocalWorkItemWidgetConnection',
nodes: [
@@ -17,20 +21,29 @@ export const workItemQueryResponse = {
};
export const updateWorkItemMutationResponse = {
- __typename: 'LocalUpdateWorkItemPayload',
- workItem: {
- __typename: 'LocalWorkItem',
- id: '1',
- widgets: {
- __typename: 'LocalWorkItemWidgetConnection',
- nodes: [
- {
- __typename: 'LocalTitleWidget',
- type: 'TITLE',
- enabled: true,
- contentText: 'Updated title',
+ data: {
+ workItemUpdate: {
+ __typename: 'LocalUpdateWorkItemPayload',
+ workItem: {
+ __typename: 'LocalWorkItem',
+ id: '1',
+ title: 'Updated title',
+ workItemType: {
+ __typename: 'WorkItemType',
+ id: 'work-item-type-1',
},
- ],
+ widgets: {
+ __typename: 'LocalWorkItemWidgetConnection',
+ nodes: [
+ {
+ __typename: 'LocalTitleWidget',
+ type: 'TITLE',
+ enabled: true,
+ contentText: 'Updated title',
+ },
+ ],
+ },
+ },
},
},
};
@@ -48,3 +61,20 @@ export const projectWorkItemTypesQueryResponse = {
},
},
};
+
+export const createWorkItemMutationResponse = {
+ data: {
+ workItemCreate: {
+ __typename: 'WorkItemCreatePayload',
+ workItem: {
+ __typename: 'WorkItem',
+ id: '1',
+ title: 'Updated title',
+ workItemType: {
+ __typename: 'WorkItemType',
+ id: 'work-item-type-1',
+ },
+ },
+ },
+ },
+};