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>2020-06-02 12:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-02 12:08:01 +0300
commit8c826685ecb0058bf6acaf960ecab7897932f2e2 (patch)
treecc2a4d3404613beccb4336ba53a1ba211697acb6 /spec/javascripts
parentf4251f269416f881d921a1bf89de802e4a70c11a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/global_search_input_spec.js (renamed from spec/javascripts/search_autocomplete_spec.js)20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/javascripts/search_autocomplete_spec.js b/spec/javascripts/global_search_input_spec.js
index 4f42d4880e8..00ae8a8f2ea 100644
--- a/spec/javascripts/search_autocomplete_spec.js
+++ b/spec/javascripts/global_search_input_spec.js
@@ -2,10 +2,10 @@
import $ from 'jquery';
import '~/gl_dropdown';
-import initSearchAutocomplete from '~/search_autocomplete';
+import initGlobalSearchInput from '~/global_search_input';
import '~/lib/utils/common_utils';
-describe('Search autocomplete dropdown', () => {
+describe('Global search input dropdown', () => {
let widget = null;
const userName = 'root';
@@ -112,15 +112,15 @@ describe('Search autocomplete dropdown', () => {
expect(list.find(mrsIHaveCreatedLink).text()).toBe("Merge requests I've created");
};
- preloadFixtures('static/search_autocomplete.html');
+ preloadFixtures('static/global_search_input.html');
beforeEach(function() {
- loadFixtures('static/search_autocomplete.html');
+ loadFixtures('static/global_search_input.html');
window.gon = {};
window.gon.current_user_id = userId;
window.gon.current_username = userName;
- return (widget = initSearchAutocomplete());
+ return (widget = initGlobalSearchInput());
});
afterEach(function() {
@@ -189,25 +189,25 @@ describe('Search autocomplete dropdown', () => {
expect(submitSpy).not.toHaveBeenTriggered();
});
- describe('disableAutocomplete', function() {
+ describe('disableDropdown', function() {
beforeEach(function() {
- widget.enableAutocomplete();
+ widget.enableDropdown();
});
it('should close the Dropdown', function() {
const toggleSpy = spyOn(widget.dropdownToggle, 'dropdown');
widget.dropdown.addClass('show');
- widget.disableAutocomplete();
+ widget.disableDropdown();
expect(toggleSpy).toHaveBeenCalledWith('toggle');
});
});
- describe('enableAutocomplete', function() {
+ describe('enableDropdown', function() {
it('should open the Dropdown', function() {
const toggleSpy = spyOn(widget.dropdownToggle, 'dropdown');
- widget.enableAutocomplete();
+ widget.enableDropdown();
expect(toggleSpy).toHaveBeenCalledWith('toggle');
});