diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-06-09 08:36:56 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-06-09 08:36:56 +0000 |
commit | 288e8c7c42bd9507725637dcf7e5b8e0eaa5229c (patch) | |
tree | 4e63d8f8a13f1254ce2544d5e74dbc1732d4ccba /spec | |
parent | 4a22895492fd7e9111f11b6659c31b509995721c (diff) | |
parent | dfa4a440f032020cf000841d7e1c799d142f92c8 (diff) | |
download | gitlab-ce-288e8c7c42bd9507725637dcf7e5b8e0eaa5229c.tar.gz |
Merge branch 'issuable-sidebar-edit-button-field-focus' into 'master'
Fixed dropdown filter input not focusing after transition
Closes #33216
See merge request !12020
Diffstat (limited to 'spec')
-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)); }); }); |