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

GlDeprecatedDropdown to GlDropdown in cli_commands.vue

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