Commit de3eabc5 authored by Fatih Acet's avatar Fatih Acet

Fix loading branches list on cherry pick modal after merge.

parent f3a3bd50
import Project from '~/project';
import SmartInterval from '~/smart_interval'; import SmartInterval from '~/smart_interval';
import Flash from '../flash'; import Flash from '../flash';
import { import {
...@@ -140,6 +141,7 @@ export default { ...@@ -140,6 +141,7 @@ export default {
const el = document.createElement('div'); const el = document.createElement('div');
el.innerHTML = res.body; el.innerHTML = res.body;
document.body.appendChild(el); document.body.appendChild(el);
Project.initRefSwitcher();
} }
}) })
.catch(() => { .catch(() => {
......
...@@ -63,6 +63,18 @@ describe 'Merge request', :js do ...@@ -63,6 +63,18 @@ describe 'Merge request', :js do
expect(page).to have_selector('.accept-merge-request') expect(page).to have_selector('.accept-merge-request')
expect(find('.accept-merge-request')['disabled']).not_to be(true) expect(find('.accept-merge-request')['disabled']).not_to be(true)
end 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 end
context 'view merge request with external CI service' do context 'view merge request with external CI service' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment