diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-14 06:13:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-14 06:13:26 +0300 |
commit | 6be10e8588cd18091d8302fd52e166a71900f7bc (patch) | |
tree | 5e0e785ca56df17982142a9ddde4a471d1a4013c /spec/frontend | |
parent | 8aea332821a78e83ce93f5b3bac7de5f95a3c7b8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/sidebar/components/labels/labels_select_widget/labels_select_root_spec.js | 4 | ||||
-rw-r--r-- | spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/labels_select_root_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/labels_select_root_spec.js index 2995c268966..b5656ef3a7b 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/labels_select_root_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/labels_select_root_spec.js @@ -14,6 +14,7 @@ import updateIssueLabelsMutation from '~/boards/graphql/issue_set_labels.mutatio import updateMergeRequestLabelsMutation from '~/sidebar/queries/update_merge_request_labels.mutation.graphql'; import issuableLabelsSubscription from 'ee_else_ce/sidebar/queries/issuable_labels.subscription.graphql'; import updateEpicLabelsMutation from '~/sidebar/components/labels/labels_select_widget/graphql/epic_update_labels.mutation.graphql'; +import updateTestCaseLabelsMutation from '~/sidebar/components/labels/labels_select_widget/graphql/update_test_case_labels.mutation.graphql'; import LabelsSelectRoot from '~/sidebar/components/labels/labels_select_widget/labels_select_root.vue'; import { mockConfig, @@ -37,6 +38,7 @@ const updateLabelsMutation = { [IssuableType.Issue]: updateIssueLabelsMutation, [IssuableType.MergeRequest]: updateMergeRequestLabelsMutation, [IssuableType.Epic]: updateEpicLabelsMutation, + [IssuableType.TestCase]: updateTestCaseLabelsMutation, }; describe('LabelsSelectRoot', () => { @@ -214,6 +216,7 @@ describe('LabelsSelectRoot', () => { ${IssuableType.Issue} ${IssuableType.MergeRequest} ${IssuableType.Epic} + ${IssuableType.TestCase} `('when updating labels for $issuableType', ({ issuableType }) => { const label = { id: 'gid://gitlab/ProjectLabel/2' }; @@ -228,6 +231,7 @@ describe('LabelsSelectRoot', () => { it('updates labels correctly after successful mutation', async () => { createComponent({ issuableType }); + await nextTick(); findDropdownContents().vm.$emit('setLabels', [label]); await waitForPromises(); diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js b/spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js index 48530a0261f..5d5a7e9a200 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/mock_data.js @@ -174,6 +174,15 @@ export const updateLabelsMutationResponse = { updateIssuableLabels: { errors: [], issuable: { + updatedAt: '2023-02-10T22:26:49Z', + updatedBy: { + id: 'gid://gitlab/User/1', + avatarUrl: 'avatar/url', + name: 'John Smith', + username: 'jsmith', + webUrl: 'http://gdk.test:3000/jsmith', + __typename: 'UserCore', + }, __typename: 'Issue', id: '1', labels: { |