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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js')
-rw-r--r--spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js32
1 files changed, 6 insertions, 26 deletions
diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js b/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js
index 575e8a73050..b6a181e6a0b 100644
--- a/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js
+++ b/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js
@@ -26,7 +26,6 @@ import {
tokenValueMilestone,
tokenValueMembership,
tokenValueConfidential,
- tokenValueEmpty,
} from './mock_data';
jest.mock('~/vue_shared/components/filtered_search_bar/filtered_search_utils', () => ({
@@ -207,33 +206,14 @@ describe('FilteredSearchBarRoot', () => {
});
});
- describe('watchers', () => {
- describe('filterValue', () => {
- it('emits component event `onFilter` with empty array and false when filter was never selected', async () => {
- wrapper = createComponent({ initialFilterValue: [tokenValueEmpty] });
- // setData usage is discouraged. See https://gitlab.com/groups/gitlab-org/-/epics/7330 for details
- // eslint-disable-next-line no-restricted-syntax
- wrapper.setData({
- initialRender: false,
- filterValue: [tokenValueEmpty],
- });
-
- await nextTick();
- expect(wrapper.emitted('onFilter')[0]).toEqual([[], false]);
- });
+ describe('events', () => {
+ it('emits component event `onFilter` with empty array and true when initially selected filter value was cleared', async () => {
+ wrapper = createComponent({ initialFilterValue: [tokenValueLabel] });
- it('emits component event `onFilter` with empty array and true when initially selected filter value was cleared', async () => {
- wrapper = createComponent({ initialFilterValue: [tokenValueLabel] });
- // setData usage is discouraged. See https://gitlab.com/groups/gitlab-org/-/epics/7330 for details
- // eslint-disable-next-line no-restricted-syntax
- wrapper.setData({
- initialRender: false,
- filterValue: [tokenValueEmpty],
- });
+ wrapper.find(GlFilteredSearch).vm.$emit('clear');
- await nextTick();
- expect(wrapper.emitted('onFilter')[0]).toEqual([[], true]);
- });
+ await nextTick();
+ expect(wrapper.emitted('onFilter')[0]).toEqual([[], true]);
});
});