diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-02 16:03:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-02 16:03:23 +0300 |
commit | a72a9af092c1bfcf9f8024d59c11cf222f07e1e7 (patch) | |
tree | 44b60265c1d476d026b2862d2c1244748f558d4f /spec/javascripts/droplab | |
parent | b085478c4c2bed74fdc6eb2c33bfc62e791baf03 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts/droplab')
-rw-r--r-- | spec/javascripts/droplab/drop_down_spec.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/spec/javascripts/droplab/drop_down_spec.js b/spec/javascripts/droplab/drop_down_spec.js index 18ab03653f4..22346c10547 100644 --- a/spec/javascripts/droplab/drop_down_spec.js +++ b/spec/javascripts/droplab/drop_down_spec.js @@ -398,14 +398,21 @@ describe('DropLab DropDown', function() { describe('render', function() { beforeEach(function() { - this.list = { querySelector: () => {}, dispatchEvent: () => {} }; - this.dropdown = { renderChildren: () => {}, list: this.list }; this.renderableList = {}; + this.list = { + querySelector: q => { + if (q === '.filter-dropdown-loading') { + return false; + } + return this.renderableList; + }, + dispatchEvent: () => {}, + }; + this.dropdown = { renderChildren: () => {}, list: this.list }; this.data = [0, 1]; this.customEvent = {}; spyOn(this.dropdown, 'renderChildren').and.callFake(data => data); - spyOn(this.list, 'querySelector').and.returnValue(this.renderableList); spyOn(this.list, 'dispatchEvent'); spyOn(this.data, 'map').and.callThrough(); spyOn(window, 'CustomEvent').and.returnValue(this.customEvent); |