Fix select2 import for project import app namespace select
This commit is contained in:
parent
813df901e8
commit
cf61ea1d04
|
@ -1,5 +1,6 @@
|
||||||
<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', () => {
|
||||||
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';
|
||||||
|
|
Loading…
Reference in New Issue