Commit 905e97f7 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch...

Merge branch 'Replace-GlDeprecatedDropdown-with-GlDropdown-in-ee/app/assets/javascripts/geo_node_form-and-ee/app/assets/javascripts/geo_replicable' into 'master'

Replace GlDeprecatedDropdown to GlDropdown in EE/app/assets/javascripts/geo_ replicable

See merge request gitlab-org/gitlab!41438
parents 8686ab9c cd3da1d8
---
title: Replace-GlDeprecatedDropdown-with-GlDropdown-in-ee/app/assets/javascripts/geo_node_form-and-ee/app/assets/javascripts/geo_replicable
merge_request: 41438
author: nuwe1
type: other
<script>
import { mapActions, mapState, mapGetters } from 'vuex';
import {
GlSearchBoxByType,
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
GlButton,
} from '@gitlab/ui';
import { GlSearchBoxByType, GlDropdown, GlDropdownItem, GlButton } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import { DEFAULT_SEARCH_DELAY, ACTION_TYPES, FILTER_STATES } from '../constants';
......@@ -13,8 +8,8 @@ export default {
name: 'GeoReplicableFilterBar',
components: {
GlSearchBoxByType,
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
GlDropdown,
GlDropdownItem,
GlButton,
},
computed: {
......@@ -53,8 +48,8 @@ export default {
<div class="row d-flex flex-column flex-sm-row">
<div class="col">
<div class="d-sm-flex mx-n1">
<gl-deprecated-dropdown :text="__('Filter by status')" class="px-1 my-1 my-sm-0 w-100">
<gl-deprecated-dropdown-item
<gl-dropdown :text="__('Filter by status')" class="px-1 my-1 my-sm-0 w-100">
<gl-dropdown-item
v-for="(filter, index) in filterOptions"
:key="index"
:class="{ 'bg-secondary-100': index === currentFilterIndex }"
......@@ -64,8 +59,8 @@ export default {
>{{ filter.label }} {{ replicableTypeName }}</span
>
<span v-else>{{ filter.label }}</span>
</gl-deprecated-dropdown-item>
</gl-deprecated-dropdown>
</gl-dropdown-item>
</gl-dropdown>
<gl-search-box-by-type
v-model="search"
:debounce="$options.debounce"
......
import Vuex from 'vuex';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import {
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
GlSearchBoxByType,
GlButton,
} from '@gitlab/ui';
import { GlDropdown, GlDropdownItem, GlSearchBoxByType, GlButton } from '@gitlab/ui';
import GeoReplicableFilterBar from 'ee/geo_replicable/components/geo_replicable_filter_bar.vue';
import { getStoreConfig } from 'ee/geo_replicable/store';
import { DEFAULT_SEARCH_DELAY } from 'ee/geo_replicable/constants';
......@@ -40,8 +35,8 @@ describe('GeoReplicableFilterBar', () => {
});
const findNavContainer = () => wrapper.find('nav');
const findGlDropdown = () => findNavContainer().find(GlDeprecatedDropdown);
const findGlDropdownItems = () => findNavContainer().findAll(GlDeprecatedDropdownItem);
const findGlDropdown = () => findNavContainer().find(GlDropdown);
const findGlDropdownItems = () => findNavContainer().findAll(GlDropdownItem);
const findDropdownItemsText = () => findGlDropdownItems().wrappers.map(w => w.text());
const findGlSearchBox = () => findNavContainer().find(GlSearchBoxByType);
const findGlButton = () => findNavContainer().find(GlButton);
......
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