Commit 75c8a753 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch...

Merge branch 'Replace-GlDeprecatedDropdown-with-GlDropdown-in-app/assets/javascripts/repository/components/breadcrumbs.vue' into 'master'

Gldeprecateddropdown to Gldropdown in breadcrumbs.vue

See merge request gitlab-org/gitlab!41427
parents 6cdf0a55 47cd0bc1
<script> <script>
import { import {
GlDeprecatedDropdown, GlDropdown,
GlDeprecatedDropdownDivider, GlDropdownDivider,
GlDeprecatedDropdownHeader, GlDropdownSectionHeader,
GlDeprecatedDropdownItem, GlDropdownItem,
GlIcon, GlIcon,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility'; import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility';
...@@ -20,10 +20,10 @@ const ROW_TYPES = { ...@@ -20,10 +20,10 @@ const ROW_TYPES = {
export default { export default {
components: { components: {
GlDeprecatedDropdown, GlDropdown,
GlDeprecatedDropdownDivider, GlDropdownDivider,
GlDeprecatedDropdownHeader, GlDropdownSectionHeader,
GlDeprecatedDropdownItem, GlDropdownItem,
GlIcon, GlIcon,
}, },
apollo: { apollo: {
...@@ -226,11 +226,11 @@ export default { ...@@ -226,11 +226,11 @@ export default {
getComponent(type) { getComponent(type) {
switch (type) { switch (type) {
case ROW_TYPES.divider: case ROW_TYPES.divider:
return 'gl-deprecated-dropdown-divider'; return 'gl-dropdown-divider';
case ROW_TYPES.header: case ROW_TYPES.header:
return 'gl-deprecated-dropdown-header'; return 'gl-dropdown-section-header';
default: default:
return 'gl-deprecated-dropdown-item'; return 'gl-dropdown-item';
} }
}, },
}, },
...@@ -246,7 +246,7 @@ export default { ...@@ -246,7 +246,7 @@ export default {
</router-link> </router-link>
</li> </li>
<li v-if="renderAddToTreeDropdown" class="breadcrumb-item"> <li v-if="renderAddToTreeDropdown" class="breadcrumb-item">
<gl-deprecated-dropdown toggle-class="add-to-tree qa-add-to-tree ml-1"> <gl-dropdown toggle-class="add-to-tree qa-add-to-tree gl-ml-2">
<template #button-content> <template #button-content>
<span class="sr-only">{{ __('Add to tree') }}</span> <span class="sr-only">{{ __('Add to tree') }}</span>
<gl-icon name="plus" :size="16" class="float-left" /> <gl-icon name="plus" :size="16" class="float-left" />
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
{{ item.text }} {{ item.text }}
</component> </component>
</template> </template>
</gl-deprecated-dropdown> </gl-dropdown>
</li> </li>
</ol> </ol>
</nav> </nav>
......
---
title: Replace `GlDeprecatedDropdown` with `GlDropdown` in `app/assets/javascripts/repository/components/breadcrumbs.vue`
merge_request: 41427
author: nuwe1
type: other
import { shallowMount, RouterLinkStub } from '@vue/test-utils'; import { shallowMount, RouterLinkStub } from '@vue/test-utils';
import { GlDeprecatedDropdown } from '@gitlab/ui'; import { GlDropdown } from '@gitlab/ui';
import Breadcrumbs from '~/repository/components/breadcrumbs.vue'; import Breadcrumbs from '~/repository/components/breadcrumbs.vue';
let vm; let vm;
...@@ -61,7 +61,7 @@ describe('Repository breadcrumbs component', () => { ...@@ -61,7 +61,7 @@ describe('Repository breadcrumbs component', () => {
vm.setData({ userPermissions: { forkProject: false, createMergeRequestIn: false } }); vm.setData({ userPermissions: { forkProject: false, createMergeRequestIn: false } });
return vm.vm.$nextTick(() => { return vm.vm.$nextTick(() => {
expect(vm.find(GlDeprecatedDropdown).exists()).toBe(false); expect(vm.find(GlDropdown).exists()).toBe(false);
}); });
}); });
...@@ -71,7 +71,7 @@ describe('Repository breadcrumbs component', () => { ...@@ -71,7 +71,7 @@ describe('Repository breadcrumbs component', () => {
vm.setData({ userPermissions: { forkProject: true, createMergeRequestIn: true } }); vm.setData({ userPermissions: { forkProject: true, createMergeRequestIn: true } });
return vm.vm.$nextTick(() => { return vm.vm.$nextTick(() => {
expect(vm.find(GlDeprecatedDropdown).exists()).toBe(true); expect(vm.find(GlDropdown).exists()).toBe(true);
}); });
}); });
}); });
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