diff options
Diffstat (limited to 'spec/frontend/pages/projects/forks/new/components')
-rw-r--r-- | spec/frontend/pages/projects/forks/new/components/fork_groups_list_item_spec.js | 7 | ||||
-rw-r--r-- | spec/frontend/pages/projects/forks/new/components/fork_groups_list_spec.js | 11 |
2 files changed, 5 insertions, 13 deletions
diff --git a/spec/frontend/pages/projects/forks/new/components/fork_groups_list_item_spec.js b/spec/frontend/pages/projects/forks/new/components/fork_groups_list_item_spec.js index b90c07a335b..b5425fa6f2e 100644 --- a/spec/frontend/pages/projects/forks/new/components/fork_groups_list_item_spec.js +++ b/spec/frontend/pages/projects/forks/new/components/fork_groups_list_item_spec.js @@ -1,14 +1,10 @@ -import { shallowMount } from '@vue/test-utils'; import { GlBadge, GlButton, GlLink } from '@gitlab/ui'; +import { shallowMount } from '@vue/test-utils'; import ForkGroupsListItem from '~/pages/projects/forks/new/components/fork_groups_list_item.vue'; describe('Fork groups list item component', () => { let wrapper; - const DEFAULT_PROPS = { - hasReachedProjectLimit: false, - }; - const DEFAULT_GROUP_DATA = { id: 22, name: 'Gitlab Org', @@ -33,7 +29,6 @@ describe('Fork groups list item component', () => { const createWrapper = (propsData) => { wrapper = shallowMount(ForkGroupsListItem, { propsData: { - ...DEFAULT_PROPS, ...propsData, }, }); diff --git a/spec/frontend/pages/projects/forks/new/components/fork_groups_list_spec.js b/spec/frontend/pages/projects/forks/new/components/fork_groups_list_spec.js index 91740c7ce3b..e7ac837a4c8 100644 --- a/spec/frontend/pages/projects/forks/new/components/fork_groups_list_spec.js +++ b/spec/frontend/pages/projects/forks/new/components/fork_groups_list_spec.js @@ -1,10 +1,10 @@ -import AxiosMockAdapter from 'axios-mock-adapter'; -import { shallowMount } from '@vue/test-utils'; import { GlLoadingIcon, GlSearchBoxByType } from '@gitlab/ui'; +import { shallowMount } from '@vue/test-utils'; +import AxiosMockAdapter from 'axios-mock-adapter'; import { nextTick } from 'vue'; import waitForPromises from 'helpers/wait_for_promises'; -import axios from '~/lib/utils/axios_utils'; import { deprecatedCreateFlash as createFlash } from '~/flash'; +import axios from '~/lib/utils/axios_utils'; import ForkGroupsList from '~/pages/projects/forks/new/components/fork_groups_list.vue'; import ForkGroupsListItem from '~/pages/projects/forks/new/components/fork_groups_list_item.vue'; @@ -16,7 +16,6 @@ describe('Fork groups list component', () => { const DEFAULT_PROPS = { endpoint: '/dummy', - hasReachedProjectLimit: false, }; const replyWith = (...args) => axiosMock.onGet(DEFAULT_PROPS.endpoint).reply(...args); @@ -94,10 +93,9 @@ describe('Fork groups list component', () => { it('renders list items for each available group', async () => { const namespaces = [{ name: 'dummy1' }, { name: 'dummy2' }, { name: 'otherdummy' }]; - const hasReachedProjectLimit = true; replyWith(200, { namespaces }); - createWrapper({ hasReachedProjectLimit }); + createWrapper(); await waitForPromises(); @@ -106,7 +104,6 @@ describe('Fork groups list component', () => { namespaces.forEach((namespace, idx) => { expect(wrapper.findAll(ForkGroupsListItem).at(idx).props()).toStrictEqual({ group: namespace, - hasReachedProjectLimit, }); }); }); |