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