Fix loading branches list on cherry pick modal after merge.

This commit is contained in:
Fatih Acet 2017-12-01 16:18:59 +01:00
parent f3a3bd50ea
commit de3eabc5bf
2 changed files with 14 additions and 0 deletions

View file

@ -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(() => {

View file

@ -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