diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2017-12-07 20:55:10 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-12-07 20:55:10 +0000 |
commit | 52ee3e0e06b3666d5f8545ce9e7eba3342088b48 (patch) | |
tree | af1add5d734e57ac6e653735136098cb5b385f74 | |
parent | 10e8a5ea627cd1092b3c499fb47e80c8653ccd1c (diff) | |
parent | de3eabc5bf530dd95dafa77efc006c163aa6b1f0 (diff) | |
download | gitlab-ce-52ee3e0e06b3666d5f8545ce9e7eba3342088b48.tar.gz |
Merge branch 'acet-fix-branches-list-on-cherry-pick-modal-after-merge' into 'master'
Fix loading branches list on cherry pick modal after merge.
Closes #33894
See merge request gitlab-org/gitlab-ce!15306
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js | 2 | ||||
-rw-r--r-- | spec/features/merge_requests/widget_spec.rb | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js index 1274db2c4c8..9cb3edead86 100644 --- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js +++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js @@ -1,3 +1,4 @@ +import Project from '~/project'; import SmartInterval from '~/smart_interval'; import Flash from '../flash'; import { @@ -140,6 +141,7 @@ export default { const el = document.createElement('div'); el.innerHTML = res.body; document.body.appendChild(el); + Project.initRefSwitcher(); } }) .catch(() => { diff --git a/spec/features/merge_requests/widget_spec.rb b/spec/features/merge_requests/widget_spec.rb index 2bad3b02250..3ee094c216e 100644 --- a/spec/features/merge_requests/widget_spec.rb +++ b/spec/features/merge_requests/widget_spec.rb @@ -63,6 +63,18 @@ describe 'Merge request', :js do expect(page).to have_selector('.accept-merge-request') expect(find('.accept-merge-request')['disabled']).not_to be(true) end + + it 'allows me to merge, see cherry-pick modal and load branches list' do + wait_for_requests + click_button 'Merge' + + wait_for_requests + click_link 'Cherry-pick' + page.find('.js-project-refs-dropdown').click + wait_for_requests + + expect(page.all('.js-cherry-pick-form .dropdown-content li').size).to be > 1 + end end context 'view merge request with external CI service' do |