diff options
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/work_items/components/work_item_description_spec.js | 12 | ||||
-rw-r--r-- | spec/frontend/work_items/mock_data.js | 20 |
2 files changed, 26 insertions, 6 deletions
diff --git a/spec/frontend/work_items/components/work_item_description_spec.js b/spec/frontend/work_items/components/work_item_description_spec.js index c79b049442d..be21e9c3834 100644 --- a/spec/frontend/work_items/components/work_item_description_spec.js +++ b/spec/frontend/work_items/components/work_item_description_spec.js @@ -38,7 +38,7 @@ describe('WorkItemDescription', () => { const subscriptionHandler = jest.fn().mockResolvedValue(workItemDescriptionSubscriptionResponse); const workItemByIidResponseHandler = jest.fn().mockResolvedValue(projectWorkItemResponse); let workItemResponseHandler; - let workItemsMvc2; + let workItemsMvc; const findMarkdownField = () => wrapper.findComponent(MarkdownField); const findMarkdownEditor = () => wrapper.findComponent(MarkdownEditor); @@ -46,7 +46,7 @@ describe('WorkItemDescription', () => { const findEditedAt = () => wrapper.findComponent(EditedAt); const editDescription = (newText) => { - if (workItemsMvc2) { + if (workItemsMvc) { return findMarkdownEditor().vm.$emit('input', newText); } return wrapper.find('textarea').setValue(newText); @@ -82,7 +82,7 @@ describe('WorkItemDescription', () => { }, provide: { glFeatures: { - workItemsMvc2, + workItemsMvc, }, }, stubs: { @@ -104,11 +104,11 @@ describe('WorkItemDescription', () => { }); describe.each([true, false])( - 'editing description with workItemsMvc2 %workItemsMvc2Enabled', - (workItemsMvc2Enabled) => { + 'editing description with workItemsMvc %workItemsMvcEnabled', + (workItemsMvcEnabled) => { beforeEach(() => { beforeEach(() => { - workItemsMvc2 = workItemsMvc2Enabled; + workItemsMvc = workItemsMvcEnabled; }); }); diff --git a/spec/frontend/work_items/mock_data.js b/spec/frontend/work_items/mock_data.js index 635a1f326f8..67fda49919a 100644 --- a/spec/frontend/work_items/mock_data.js +++ b/spec/frontend/work_items/mock_data.js @@ -97,6 +97,12 @@ export const workItemQueryResponse = { id: 'gid://gitlab/WorkItem/444', createdAt: '2022-08-03T12:41:54Z', closedAt: null, + confidential: false, + title: '123', + state: 'OPEN', + workItemType: { + id: '1', + }, }, ], }, @@ -142,6 +148,14 @@ export const updateWorkItemMutationResponse = { nodes: [ { id: 'gid://gitlab/WorkItem/444', + createdAt: '2022-08-03T12:41:54Z', + closedAt: null, + confidential: false, + title: '123', + state: 'OPEN', + workItemType: { + id: '1', + }, }, ], }, @@ -318,6 +332,12 @@ export const workItemResponseFactory = ({ id: 'gid://gitlab/WorkItem/444', createdAt: '2022-08-03T12:41:54Z', closedAt: null, + confidential: false, + title: '123', + state: 'OPEN', + workItemType: { + id: '1', + }, }, ], }, |