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:
Diffstat (limited to 'spec/frontend/super_sidebar/components/global_search/command_palette/fake_search_input_spec.js')
-rw-r--r--spec/frontend/super_sidebar/components/global_search/command_palette/fake_search_input_spec.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/frontend/super_sidebar/components/global_search/command_palette/fake_search_input_spec.js b/spec/frontend/super_sidebar/components/global_search/command_palette/fake_search_input_spec.js
index 0aeb4c89d06..a8e91395303 100644
--- a/spec/frontend/super_sidebar/components/global_search/command_palette/fake_search_input_spec.js
+++ b/spec/frontend/super_sidebar/components/global_search/command_palette/fake_search_input_spec.js
@@ -1,8 +1,9 @@
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import FakeSearchInput from '~/super_sidebar/components/global_search/command_palette/fake_search_input.vue';
import {
+ SEARCH_SCOPE_PLACEHOLDER,
+ COMMON_HANDLES,
COMMAND_HANDLE,
- SEARCH_SCOPE,
} from '~/super_sidebar/components/global_search/command_palette/constants';
describe('FakeSearchInput', () => {
@@ -27,10 +28,13 @@ describe('FakeSearchInput', () => {
});
describe('placeholder', () => {
- it('should render the placeholder for its search scope when there is no user input', () => {
- createComponent();
- expect(findSearchScopePlaceholder().text()).toBe(SEARCH_SCOPE[COMMAND_HANDLE]);
- });
+ it.each(COMMON_HANDLES)(
+ 'should render the placeholder for the %s scope when there is no user input',
+ (scope) => {
+ createComponent({ scope });
+ expect(findSearchScopePlaceholder().text()).toBe(SEARCH_SCOPE_PLACEHOLDER[scope]);
+ },
+ );
it('should NOT render the placeholder when there is user input', () => {
createComponent({ userInput: 'todo' });