diff options
author | Phil Hughes <me@iamphill.com> | 2017-06-08 18:48:29 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-06-08 20:06:47 +0300 |
commit | dfa4a440f032020cf000841d7e1c799d142f92c8 (patch) | |
tree | 85431b177a0d2f4c34fab9ecc4299361a8b23d54 /spec/javascripts/gl_dropdown_spec.js | |
parent | fd072e2221147f52edf74d4dcedb2ffa3799ab2f (diff) |
Fixed dropdown filter input not focusing after transition
Closes #33216
Diffstat (limited to 'spec/javascripts/gl_dropdown_spec.js')
-rw-r--r-- | spec/javascripts/gl_dropdown_spec.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/javascripts/gl_dropdown_spec.js b/spec/javascripts/gl_dropdown_spec.js index 3292590b9ed..10fcc590c89 100644 --- a/spec/javascripts/gl_dropdown_spec.js +++ b/spec/javascripts/gl_dropdown_spec.js @@ -185,7 +185,7 @@ import '~/lib/utils/url_utility'; expect($(document.activeElement)).toEqual($(SEARCH_INPUT_SELECTOR)); }); - it('should focus on input when opening for the second time', () => { + it('should focus on input when opening for the second time after transition', () => { remoteCallback(); this.dropdownContainerElement.trigger({ type: 'keyup', @@ -193,6 +193,7 @@ import '~/lib/utils/url_utility'; keyCode: ARROW_KEYS.ESC }); this.dropdownButtonElement.click(); + this.dropdownContainerElement.trigger('transitionend'); expect($(document.activeElement)).toEqual($(SEARCH_INPUT_SELECTOR)); }); }); @@ -201,6 +202,7 @@ import '~/lib/utils/url_utility'; it('should focus input when passing array data to drop down', () => { initDropDown.call(this, false, true); this.dropdownButtonElement.click(); + this.dropdownContainerElement.trigger('transitionend'); expect($(document.activeElement)).toEqual($(SEARCH_INPUT_SELECTOR)); }); }); |