Commit 07363237 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'fix-broken-select2-import-project-app' into 'master'

Fix select2 import for project import app namespace select

See merge request gitlab-org/gitlab-ce!25307
parents f6483cc3 cf61ea1d
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import 'select2/select2';
export default { export default {
name: 'Select2Select', name: 'Select2Select',
......
...@@ -49,6 +49,19 @@ describe('ProviderRepoTableRow', () => { ...@@ -49,6 +49,19 @@ describe('ProviderRepoTableRow', () => {
expect(vm.$el.querySelector('.js-import-button')).not.toBeNull(); expect(vm.$el.querySelector('.js-import-button')).not.toBeNull();
}); });
it('renders a select2 namespace select', () => {
vm = createComponent();
const dropdownTrigger = vm.$el.querySelector('.js-namespace-select');
expect(dropdownTrigger).not.toBeNull();
expect(dropdownTrigger.classList.contains('select2-container')).toBe(true);
dropdownTrigger.click();
expect(vm.$el.querySelector('.select2-drop')).not.toBeNull();
});
it('imports repo when clicking import button', done => { it('imports repo when clicking import button', done => {
const importPath = '/import-path'; const importPath = '/import-path';
const defaultTargetNamespace = 'user'; const defaultTargetNamespace = 'user';
......
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