diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/frontend/vue_shared/components/sidebar/labels_select_widget/store/mutations_spec.js | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/frontend/vue_shared/components/sidebar/labels_select_widget/store/mutations_spec.js')
-rw-r--r-- | spec/frontend/vue_shared/components/sidebar/labels_select_widget/store/mutations_spec.js | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_widget/store/mutations_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select_widget/store/mutations_spec.js index 9e965cb33e8..1f0e0eee420 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_widget/store/mutations_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select_widget/store/mutations_spec.js @@ -67,58 +67,6 @@ describe('LabelsSelect Mutations', () => { }); }); - describe(`${types.REQUEST_LABELS}`, () => { - it('sets value of `state.labelsFetchInProgress` to true', () => { - const state = { - labelsFetchInProgress: false, - }; - mutations[types.REQUEST_LABELS](state); - - expect(state.labelsFetchInProgress).toBe(true); - }); - }); - - describe(`${types.RECEIVE_SET_LABELS_SUCCESS}`, () => { - const selectedLabels = [{ id: 2 }, { id: 4 }]; - const labels = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }]; - - it('sets value of `state.labelsFetchInProgress` to false', () => { - const state = { - selectedLabels, - labelsFetchInProgress: true, - }; - mutations[types.RECEIVE_SET_LABELS_SUCCESS](state, labels); - - expect(state.labelsFetchInProgress).toBe(false); - }); - - it('sets provided `labels` to `state.labels` along with `set` prop based on `state.selectedLabels`', () => { - const selectedLabelIds = selectedLabels.map((label) => label.id); - const state = { - selectedLabels, - labelsFetchInProgress: true, - }; - mutations[types.RECEIVE_SET_LABELS_SUCCESS](state, labels); - - state.labels.forEach((label) => { - if (selectedLabelIds.includes(label.id)) { - expect(label.set).toBe(true); - } - }); - }); - }); - - describe(`${types.RECEIVE_SET_LABELS_FAILURE}`, () => { - it('sets value of `state.labelsFetchInProgress` to false', () => { - const state = { - labelsFetchInProgress: true, - }; - mutations[types.RECEIVE_SET_LABELS_FAILURE](state); - - expect(state.labelsFetchInProgress).toBe(false); - }); - }); - describe(`${types.UPDATE_SELECTED_LABELS}`, () => { let labels; |