Commit 576098ec authored by Marvin Karegyeya's avatar Marvin Karegyeya Committed by Andrew Fontaine

GlDeprecatedDropdown to GlDropdown in cli_commands.vue

parent 7c4f0c96
<script> <script>
import { GlDeprecatedDropdown } from '@gitlab/ui'; import { GlDropdown } from '@gitlab/ui';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import CodeInstruction from '~/vue_shared/components/registry/code_instruction.vue'; import CodeInstruction from '~/vue_shared/components/registry/code_instruction.vue';
...@@ -17,7 +17,7 @@ const trackingLabel = 'quickstart_dropdown'; ...@@ -17,7 +17,7 @@ const trackingLabel = 'quickstart_dropdown';
export default { export default {
components: { components: {
GlDeprecatedDropdown, GlDropdown,
CodeInstruction, CodeInstruction,
}, },
mixins: [Tracking.mixin({ label: trackingLabel })], mixins: [Tracking.mixin({ label: trackingLabel })],
...@@ -37,15 +37,14 @@ export default { ...@@ -37,15 +37,14 @@ export default {
}; };
</script> </script>
<template> <template>
<gl-deprecated-dropdown <gl-dropdown
:text="$options.i18n.QUICK_START" :text="$options.i18n.QUICK_START"
variant="primary" variant="info"
size="sm"
right right
@shown="track('click_dropdown')" @shown="track('click_dropdown')"
> >
<!-- This li is used as a container since gl-dropdown produces a root ul, this mimics the functionality exposed by b-dropdown-form --> <!-- This li is used as a container since gl-dropdown produces a root ul, this mimics the functionality exposed by b-dropdown-form -->
<li role="presentation" class="px-2 py-1 dropdown-menu-large"> <li role="presentation" class="px-2 py-1">
<code-instruction <code-instruction
:label="$options.i18n.LOGIN_COMMAND_LABEL" :label="$options.i18n.LOGIN_COMMAND_LABEL"
:instruction="dockerLoginCommand" :instruction="dockerLoginCommand"
...@@ -71,5 +70,5 @@ export default { ...@@ -71,5 +70,5 @@ export default {
:tracking-label="$options.trackingLabel" :tracking-label="$options.trackingLabel"
/> />
</li> </li>
</gl-deprecated-dropdown> </gl-dropdown>
</template> </template>
---
title: Replace Deprecated Dropdown in Container Registry Explorer Page
merge_request: 41425
author: nuwe1
type: other
import Vuex from 'vuex'; import Vuex from 'vuex';
import { mount, createLocalVue } from '@vue/test-utils'; import { mount, createLocalVue } from '@vue/test-utils';
import { GlDeprecatedDropdown } from '@gitlab/ui'; import { GlDropdown } from '@gitlab/ui';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import * as getters from '~/registry/explorer/stores/getters'; import * as getters from '~/registry/explorer/stores/getters';
import QuickstartDropdown from '~/registry/explorer/components/list_page/cli_commands.vue'; import QuickstartDropdown from '~/registry/explorer/components/list_page/cli_commands.vue';
...@@ -23,7 +23,7 @@ describe('cli_commands', () => { ...@@ -23,7 +23,7 @@ describe('cli_commands', () => {
let wrapper; let wrapper;
let store; let store;
const findDropdownButton = () => wrapper.find(GlDeprecatedDropdown); const findDropdownButton = () => wrapper.find(GlDropdown);
const findCodeInstruction = () => wrapper.findAll(CodeInstruction); const findCodeInstruction = () => wrapper.findAll(CodeInstruction);
const mountComponent = () => { const mountComponent = () => {
......
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