diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) | |
download | gitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js')
-rw-r--r-- | spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js b/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js index e15389be53a..72640f3d601 100644 --- a/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js +++ b/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js @@ -1,11 +1,11 @@ -import { GlBadge, GlButton } from '@gitlab/ui'; +import { GlBadge, GlButton, GlDropdown } from '@gitlab/ui'; import { createLocalVue, shallowMount } from '@vue/test-utils'; import { nextTick } from 'vue'; import Vuex from 'vuex'; import { STATUSES } from '~/import_entities//constants'; +import ImportGroupDropdown from '~/import_entities/components/group_dropdown.vue'; import ImportStatus from '~/import_entities/components/import_status.vue'; import ProviderRepoTableRow from '~/import_entities/import_projects/components/provider_repo_table_row.vue'; -import Select2Select from '~/vue_shared/components/select2_select.vue'; describe('ProviderRepoTableRow', () => { let wrapper; @@ -16,10 +16,8 @@ describe('ProviderRepoTableRow', () => { newName: 'newName', }; - const availableNamespaces = [ - { text: 'Groups', children: [{ id: 'test', text: 'test' }] }, - { text: 'Users', children: [{ id: 'root', text: 'root' }] }, - ]; + const availableNamespaces = ['test']; + const userNamespace = 'root'; function initStore(initialState) { const store = new Vuex.Store({ @@ -48,7 +46,7 @@ describe('ProviderRepoTableRow', () => { wrapper = shallowMount(ProviderRepoTableRow, { localVue, store, - propsData: { availableNamespaces, ...props }, + propsData: { availableNamespaces, userNamespace, ...props }, }); } @@ -81,9 +79,8 @@ describe('ProviderRepoTableRow', () => { expect(wrapper.find(ImportStatus).props().status).toBe(STATUSES.NONE); }); - it('renders a select2 namespace select', () => { - expect(wrapper.find(Select2Select).exists()).toBe(true); - expect(wrapper.find(Select2Select).props().options.data).toBe(availableNamespaces); + it('renders a group namespace select', () => { + expect(wrapper.find(ImportGroupDropdown).props().namespaces).toBe(availableNamespaces); }); it('renders import button', () => { @@ -133,7 +130,7 @@ describe('ProviderRepoTableRow', () => { }); it('does not renders a namespace select', () => { - expect(wrapper.find(Select2Select).exists()).toBe(false); + expect(wrapper.find(GlDropdown).exists()).toBe(false); }); it('does not render import button', () => { |