diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-04 12:10:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-04 12:10:47 +0300 |
commit | 13f31ab91aeb5233a7b64f2740fee246294161fc (patch) | |
tree | d47fa67102b45131f0dd04257e97ab955a134c17 /spec/frontend/work_items | |
parent | bf3e636cc03f219a8411cdd723a364a08c8502b1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/work_items')
-rw-r--r-- | spec/frontend/work_items/components/work_item_links/work_item_links_menu_spec.js | 10 | ||||
-rw-r--r-- | spec/frontend/work_items/mock_data.js | 17 |
2 files changed, 18 insertions, 9 deletions
diff --git a/spec/frontend/work_items/components/work_item_links/work_item_links_menu_spec.js b/spec/frontend/work_items/components/work_item_links/work_item_links_menu_spec.js index f8471b7f167..69316b7f0ca 100644 --- a/spec/frontend/work_items/components/work_item_links/work_item_links_menu_spec.js +++ b/spec/frontend/work_items/components/work_item_links/work_item_links_menu_spec.js @@ -6,7 +6,7 @@ import createMockApollo from 'helpers/mock_apollo_helper'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; import WorkItemLinksMenu from '~/work_items/components/work_item_links/work_item_links_menu.vue'; -import changeWorkItemParentMutation from '~/work_items/graphql/change_work_item_parent_link.mutation.graphql'; +import changeWorkItemParentMutation from '~/work_items/graphql/update_work_item.mutation.graphql'; import getWorkItemLinksQuery from '~/work_items/graphql/work_item_links.query.graphql'; import { WIDGET_TYPE_HIERARCHY } from '~/work_items/constants'; import { workItemHierarchyResponse, changeWorkItemParentMutationResponse } from '../../mock_data'; @@ -87,8 +87,12 @@ describe('WorkItemLinksMenu', () => { await waitForPromises(); expect(mutationHandler).toHaveBeenCalledWith({ - id: WORK_ITEM_ID, - parentId: null, + input: { + id: WORK_ITEM_ID, + hierarchyWidget: { + parentId: null, + }, + }, }); }); diff --git a/spec/frontend/work_items/mock_data.js b/spec/frontend/work_items/mock_data.js index 46aaf480564..050d3c56727 100644 --- a/spec/frontend/work_items/mock_data.js +++ b/spec/frontend/work_items/mock_data.js @@ -480,14 +480,19 @@ export const changeWorkItemParentMutationResponse = { data: { workItemUpdate: { workItem: { + description: null, id: 'gid://gitlab/WorkItem/2', - workItemType: { - id: 'gid://gitlab/WorkItems::Type/5', - __typename: 'WorkItemType', - }, - title: 'Foo', state: 'OPEN', - __typename: 'WorkItem', + title: 'Foo', + widgets: [ + { + type: 'HIERARCHY', + parent: null, + children: { + nodes: [], + }, + }, + ], }, errors: [], __typename: 'WorkItemUpdatePayload', |