Migrate GlNewDropdownItem to GlDropdownItem

GitLab UI doesn't export GlNewDropdownItem anymore, this updates all
imports to use GlDropdownItem instead.
parent cbf5d0f0
<script> <script>
import { GlDropdown, GlNewDropdownItem, GlSprintf } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem, GlSprintf } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import allVersionsMixin from '../../mixins/all_versions'; import allVersionsMixin from '../../mixins/all_versions';
import { findVersionId } from '../../utils/design_management_utils'; import { findVersionId } from '../../utils/design_management_utils';
...@@ -7,7 +7,7 @@ import { findVersionId } from '../../utils/design_management_utils'; ...@@ -7,7 +7,7 @@ import { findVersionId } from '../../utils/design_management_utils';
export default { export default {
components: { components: {
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlSprintf, GlSprintf,
}, },
mixins: [allVersionsMixin], mixins: [allVersionsMixin],
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
<template> <template>
<gl-dropdown :text="dropdownText" size="small"> <gl-dropdown :text="dropdownText" size="small">
<gl-new-dropdown-item <gl-dropdown-item
v-for="(version, index) in allVersions" v-for="(version, index) in allVersions"
:key="version.id" :key="version.id"
:is-check-item="true" :is-check-item="true"
...@@ -76,6 +76,6 @@ export default { ...@@ -76,6 +76,6 @@ export default {
{{ allVersions.length - index }} {{ allVersions.length - index }}
</template> </template>
</gl-sprintf> </gl-sprintf>
</gl-new-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
</template> </template>
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
GlFormGroup, GlFormGroup,
GlFormCheckbox, GlFormCheckbox,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { import {
I18N_ALERT_SETTINGS_FORM, I18N_ALERT_SETTINGS_FORM,
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
GlIcon, GlIcon,
GlFormCheckbox, GlFormCheckbox,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
}, },
inject: ['service', 'alertSettings'], inject: ['service', 'alertSettings'],
data() { data() {
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
:text="issueTemplateHeader" :text="issueTemplateHeader"
:block="true" :block="true"
> >
<gl-new-dropdown-item <gl-dropdown-item
v-for="template in templates" v-for="template in templates"
:key="template.key" :key="template.key"
data-qa-selector="incident_templates_item" data-qa-selector="incident_templates_item"
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
@click="selectIssueTemplate(template.key)" @click="selectIssueTemplate(template.key)"
> >
{{ template.name }} {{ template.name }}
</gl-new-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
</gl-form-group> </gl-form-group>
......
<script> <script>
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { GlDropdown, GlNewDropdownItem, GlLink } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem, GlLink } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { defaultIntegrationLevel, overrideDropdownDescriptions } from '../constants'; import { defaultIntegrationLevel, overrideDropdownDescriptions } from '../constants';
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
name: 'OverrideDropdown', name: 'OverrideDropdown',
components: { components: {
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlLink, GlLink,
}, },
props: { props: {
...@@ -74,13 +74,13 @@ export default { ...@@ -74,13 +74,13 @@ export default {
</span> </span>
<input name="service[inherit_from_id]" :value="override ? '' : inheritFromId" type="hidden" /> <input name="service[inherit_from_id]" :value="override ? '' : inheritFromId" type="hidden" />
<gl-dropdown :text="selected.text"> <gl-dropdown :text="selected.text">
<gl-new-dropdown-item <gl-dropdown-item
v-for="option in $options.dropdownOptions" v-for="option in $options.dropdownOptions"
:key="option.value" :key="option.value"
@click="onClick(option)" @click="onClick(option)"
> >
{{ option.text }} {{ option.text }}
</gl-new-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
</div> </div>
</template> </template>
...@@ -3,7 +3,7 @@ import { ...@@ -3,7 +3,7 @@ import {
GlAlert, GlAlert,
GlButton, GlButton,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlDropdownText, GlDropdownText,
GlFormGroup, GlFormGroup,
GlFormSelect, GlFormSelect,
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
GlAlert, GlAlert,
GlButton, GlButton,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlDropdownText, GlDropdownText,
GlFormGroup, GlFormGroup,
GlFormSelect, GlFormSelect,
...@@ -305,14 +305,14 @@ export default { ...@@ -305,14 +305,14 @@ export default {
<gl-loading-icon v-if="isFetching" /> <gl-loading-icon v-if="isFetching" />
<gl-new-dropdown-item <gl-dropdown-item
v-for="user in users" v-for="user in users"
v-else v-else
:key="user.id" :key="user.id"
@click="updateMapping(data.item.jiraAccountId, user.id, user.username)" @click="updateMapping(data.item.jiraAccountId, user.id, user.username)"
> >
{{ user.username }} ({{ user.name }}) {{ user.username }} ({{ user.name }})
</gl-new-dropdown-item> </gl-dropdown-item>
<gl-dropdown-text v-show="shouldShowNoMatchesFoundText" class="text-secondary"> <gl-dropdown-text v-show="shouldShowNoMatchesFoundText" class="text-secondary">
{{ __('No matches found') }} {{ __('No matches found') }}
......
...@@ -3,7 +3,7 @@ import { ...@@ -3,7 +3,7 @@ import {
GlDropdown, GlDropdown,
GlDropdownDivider, GlDropdownDivider,
GlNewDropdownHeader, GlNewDropdownHeader,
GlNewDropdownItem, GlDropdownItem,
GlLoadingIcon, GlLoadingIcon,
GlSearchBoxByType, GlSearchBoxByType,
GlIcon, GlIcon,
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
GlDropdown, GlDropdown,
GlDropdownDivider, GlDropdownDivider,
GlNewDropdownHeader, GlNewDropdownHeader,
GlNewDropdownItem, GlDropdownItem,
GlLoadingIcon, GlLoadingIcon,
GlSearchBoxByType, GlSearchBoxByType,
GlIcon, GlIcon,
...@@ -211,11 +211,11 @@ export default { ...@@ -211,11 +211,11 @@ export default {
@keydown.enter.prevent="onSearchBoxEnter" @keydown.enter.prevent="onSearchBoxEnter"
/> />
<gl-new-dropdown-item @click="onMilestoneClicked(null)"> <gl-dropdown-item @click="onMilestoneClicked(null)">
<span :class="{ 'pl-4': true, 'selected-item': selectedMilestones.length === 0 }"> <span :class="{ 'pl-4': true, 'selected-item': selectedMilestones.length === 0 }">
{{ $options.translations.noMilestone }} {{ $options.translations.noMilestone }}
</span> </span>
</gl-new-dropdown-item> </gl-dropdown-item>
<gl-dropdown-divider /> <gl-dropdown-divider />
...@@ -230,7 +230,7 @@ export default { ...@@ -230,7 +230,7 @@ export default {
<gl-dropdown-divider /> <gl-dropdown-divider />
</template> </template>
<template v-else-if="dropdownItems.length"> <template v-else-if="dropdownItems.length">
<gl-new-dropdown-item <gl-dropdown-item
v-for="item in dropdownItems" v-for="item in dropdownItems"
:key="item" :key="item"
role="milestone option" role="milestone option"
...@@ -239,12 +239,12 @@ export default { ...@@ -239,12 +239,12 @@ export default {
<span :class="{ 'pl-4': true, 'selected-item': isSelectedMilestone(item) }"> <span :class="{ 'pl-4': true, 'selected-item': isSelectedMilestone(item) }">
{{ item }} {{ item }}
</span> </span>
</gl-new-dropdown-item> </gl-dropdown-item>
<gl-dropdown-divider /> <gl-dropdown-divider />
</template> </template>
<gl-new-dropdown-item v-for="(item, idx) in extraLinks" :key="idx" :href="item.url"> <gl-dropdown-item v-for="(item, idx) in extraLinks" :key="idx" :href="item.url">
<span class="pl-4">{{ item.text }}</span> <span class="pl-4">{{ item.text }}</span>
</gl-new-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
</template> </template>
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
GlFormGroup, GlFormGroup,
GlFormInput, GlFormInput,
GlDropdown, GlDropdown,
GlNewDropdownItem as GlDropdownItem, GlDropdownItem,
GlModal, GlModal,
GlTooltipDirective, GlTooltipDirective,
GlIcon, GlIcon,
......
...@@ -4,7 +4,7 @@ import { ...@@ -4,7 +4,7 @@ import {
GlDeprecatedButton, GlDeprecatedButton,
GlDropdown, GlDropdown,
GlDropdownDivider, GlDropdownDivider,
GlNewDropdownItem, GlDropdownItem,
GlModal, GlModal,
GlIcon, GlIcon,
GlModalDirective, GlModalDirective,
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
GlDeprecatedButton, GlDeprecatedButton,
GlDropdown, GlDropdown,
GlDropdownDivider, GlDropdownDivider,
GlNewDropdownItem, GlDropdownItem,
GlModal, GlModal,
GlIcon, GlIcon,
DuplicateDashboardModal, DuplicateDashboardModal,
...@@ -157,13 +157,13 @@ export default { ...@@ -157,13 +157,13 @@ export default {
</template> </template>
<template v-if="addingMetricsAvailable"> <template v-if="addingMetricsAvailable">
<gl-new-dropdown-item <gl-dropdown-item
v-gl-modal="$options.modalIds.addMetric" v-gl-modal="$options.modalIds.addMetric"
data-qa-selector="add_metric_button" data-qa-selector="add_metric_button"
data-testid="add-metric-item" data-testid="add-metric-item"
> >
{{ $options.i18n.addMetric }} {{ $options.i18n.addMetric }}
</gl-new-dropdown-item> </gl-dropdown-item>
<gl-modal <gl-modal
ref="addMetricModal" ref="addMetricModal"
:modal-id="$options.modalIds.addMetric" :modal-id="$options.modalIds.addMetric"
...@@ -194,20 +194,20 @@ export default { ...@@ -194,20 +194,20 @@ export default {
</gl-modal> </gl-modal>
</template> </template>
<gl-new-dropdown-item <gl-dropdown-item
v-if="isMenuItemEnabled.addPanel" v-if="isMenuItemEnabled.addPanel"
data-testid="add-panel-item-enabled" data-testid="add-panel-item-enabled"
:to="newPanelPageLocation" :to="newPanelPageLocation"
> >
{{ $options.i18n.addPanel }} {{ $options.i18n.addPanel }}
</gl-new-dropdown-item> </gl-dropdown-item>
<!-- <!--
wrapper for tooltip as button can be `disabled` wrapper for tooltip as button can be `disabled`
https://bootstrap-vue.org/docs/components/tooltip#disabled-elements https://bootstrap-vue.org/docs/components/tooltip#disabled-elements
--> -->
<div v-else v-gl-tooltip :title="$options.i18n.addPanelInfo"> <div v-else v-gl-tooltip :title="$options.i18n.addPanelInfo">
<gl-new-dropdown-item <gl-dropdown-item
:alt="$options.i18n.addPanelInfo" :alt="$options.i18n.addPanelInfo"
:to="newPanelPageLocation" :to="newPanelPageLocation"
data-testid="add-panel-item-disabled" data-testid="add-panel-item-disabled"
...@@ -215,24 +215,24 @@ export default { ...@@ -215,24 +215,24 @@ export default {
class="gl-cursor-not-allowed" class="gl-cursor-not-allowed"
> >
<span class="gl-text-gray-400">{{ $options.i18n.addPanel }}</span> <span class="gl-text-gray-400">{{ $options.i18n.addPanel }}</span>
</gl-new-dropdown-item> </gl-dropdown-item>
</div> </div>
<gl-new-dropdown-item <gl-dropdown-item
v-if="isMenuItemEnabled.editDashboard" v-if="isMenuItemEnabled.editDashboard"
:href="selectedDashboard ? selectedDashboard.project_blob_path : null" :href="selectedDashboard ? selectedDashboard.project_blob_path : null"
data-qa-selector="edit_dashboard_button_enabled" data-qa-selector="edit_dashboard_button_enabled"
data-testid="edit-dashboard-item-enabled" data-testid="edit-dashboard-item-enabled"
> >
{{ $options.i18n.editDashboard }} {{ $options.i18n.editDashboard }}
</gl-new-dropdown-item> </gl-dropdown-item>
<!-- <!--
wrapper for tooltip as button can be `disabled` wrapper for tooltip as button can be `disabled`
https://bootstrap-vue.org/docs/components/tooltip#disabled-elements https://bootstrap-vue.org/docs/components/tooltip#disabled-elements
--> -->
<div v-else v-gl-tooltip :title="$options.i18n.editDashboardInfo"> <div v-else v-gl-tooltip :title="$options.i18n.editDashboardInfo">
<gl-new-dropdown-item <gl-dropdown-item
:alt="$options.i18n.editDashboardInfo" :alt="$options.i18n.editDashboardInfo"
:href="selectedDashboard ? selectedDashboard.project_blob_path : null" :href="selectedDashboard ? selectedDashboard.project_blob_path : null"
data-testid="edit-dashboard-item-disabled" data-testid="edit-dashboard-item-disabled"
...@@ -240,16 +240,16 @@ export default { ...@@ -240,16 +240,16 @@ export default {
class="gl-cursor-not-allowed" class="gl-cursor-not-allowed"
> >
<span class="gl-text-gray-400">{{ $options.i18n.editDashboard }}</span> <span class="gl-text-gray-400">{{ $options.i18n.editDashboard }}</span>
</gl-new-dropdown-item> </gl-dropdown-item>
</div> </div>
<template v-if="isMenuItemShown.duplicateDashboard"> <template v-if="isMenuItemShown.duplicateDashboard">
<gl-new-dropdown-item <gl-dropdown-item
v-gl-modal="$options.modalIds.duplicateDashboard" v-gl-modal="$options.modalIds.duplicateDashboard"
data-testid="duplicate-dashboard-item" data-testid="duplicate-dashboard-item"
> >
{{ $options.i18n.duplicateDashboard }} {{ $options.i18n.duplicateDashboard }}
</gl-new-dropdown-item> </gl-dropdown-item>
<duplicate-dashboard-modal <duplicate-dashboard-modal
:default-branch="defaultBranch" :default-branch="defaultBranch"
...@@ -259,25 +259,25 @@ export default { ...@@ -259,25 +259,25 @@ export default {
/> />
</template> </template>
<gl-new-dropdown-item <gl-dropdown-item
v-if="selectedDashboard" v-if="selectedDashboard"
data-testid="star-dashboard-item" data-testid="star-dashboard-item"
:disabled="isUpdatingStarredValue" :disabled="isUpdatingStarredValue"
@click="toggleStarredValue()" @click="toggleStarredValue()"
> >
{{ selectedDashboard.starred ? $options.i18n.unstarDashboard : $options.i18n.starDashboard }} {{ selectedDashboard.starred ? $options.i18n.unstarDashboard : $options.i18n.starDashboard }}
</gl-new-dropdown-item> </gl-dropdown-item>
<gl-dropdown-divider /> <gl-dropdown-divider />
<gl-new-dropdown-item <gl-dropdown-item
v-gl-modal="$options.modalIds.createDashboard" v-gl-modal="$options.modalIds.createDashboard"
data-testid="create-dashboard-item" data-testid="create-dashboard-item"
:disabled="!isMenuItemEnabled.createDashboard" :disabled="!isMenuItemEnabled.createDashboard"
:class="{ 'monitoring-actions-item-disabled': !isMenuItemEnabled.createDashboard }" :class="{ 'monitoring-actions-item-disabled': !isMenuItemEnabled.createDashboard }"
> >
{{ $options.i18n.createDashboard }} {{ $options.i18n.createDashboard }}
</gl-new-dropdown-item> </gl-dropdown-item>
<template v-if="isMenuItemEnabled.createDashboard"> <template v-if="isMenuItemEnabled.createDashboard">
<create-dashboard-modal <create-dashboard-modal
......
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
GlButton, GlButton,
GlDropdown, GlDropdown,
GlLoadingIcon, GlLoadingIcon,
GlNewDropdownItem, GlDropdownItem,
GlNewDropdownHeader, GlNewDropdownHeader,
GlSearchBoxByType, GlSearchBoxByType,
GlModalDirective, GlModalDirective,
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
GlButton, GlButton,
GlDropdown, GlDropdown,
GlLoadingIcon, GlLoadingIcon,
GlNewDropdownItem, GlDropdownItem,
GlNewDropdownHeader, GlNewDropdownHeader,
GlSearchBoxByType, GlSearchBoxByType,
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
<gl-loading-icon v-if="environmentsLoading" :inline="true" /> <gl-loading-icon v-if="environmentsLoading" :inline="true" />
<div v-else class="flex-fill overflow-auto"> <div v-else class="flex-fill overflow-auto">
<gl-new-dropdown-item <gl-dropdown-item
v-for="environment in filteredEnvironments" v-for="environment in filteredEnvironments"
:key="environment.id" :key="environment.id"
:is-check-item="true" :is-check-item="true"
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
:href="getEnvironmentPath(environment.id)" :href="getEnvironmentPath(environment.id)"
> >
{{ environment.name }} {{ environment.name }}
</gl-new-dropdown-item> </gl-dropdown-item>
</div> </div>
<div <div
v-show="shouldShowEnvironmentsDropdownNoMatchedMsg" v-show="shouldShowEnvironmentsDropdownNoMatchedMsg"
......
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
GlLink, GlLink,
GlLoadingIcon, GlLoadingIcon,
GlDropdown, GlDropdown,
GlNewDropdownItem as GlDropdownItem, GlDropdownItem,
GlDropdownDivider, GlDropdownDivider,
GlModal, GlModal,
GlModalDirective, GlModalDirective,
......
...@@ -3,7 +3,7 @@ import { mapState, mapGetters } from 'vuex'; ...@@ -3,7 +3,7 @@ import { mapState, mapGetters } from 'vuex';
import { import {
GlIcon, GlIcon,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlNewDropdownHeader, GlNewDropdownHeader,
GlDropdownDivider, GlDropdownDivider,
GlSearchBoxByType, GlSearchBoxByType,
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
components: { components: {
GlIcon, GlIcon,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlNewDropdownHeader, GlNewDropdownHeader,
GlDropdownDivider, GlDropdownDivider,
GlSearchBoxByType, GlSearchBoxByType,
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
/> />
<div class="flex-fill overflow-auto"> <div class="flex-fill overflow-auto">
<gl-new-dropdown-item <gl-dropdown-item
v-for="dashboard in starredDashboards" v-for="dashboard in starredDashboards"
:key="dashboard.path" :key="dashboard.path"
:is-check-item="true" :is-check-item="true"
...@@ -100,13 +100,13 @@ export default { ...@@ -100,13 +100,13 @@ export default {
</span> </span>
<gl-icon class="text-muted gl-flex-shrink-0 gl-ml-3 gl-align-self-center" name="star" /> <gl-icon class="text-muted gl-flex-shrink-0 gl-ml-3 gl-align-self-center" name="star" />
</div> </div>
</gl-new-dropdown-item> </gl-dropdown-item>
<gl-dropdown-divider <gl-dropdown-divider
v-if="starredDashboards.length && nonStarredDashboards.length" v-if="starredDashboards.length && nonStarredDashboards.length"
ref="starredListDivider" ref="starredListDivider"
/> />
<gl-new-dropdown-item <gl-dropdown-item
v-for="dashboard in nonStarredDashboards" v-for="dashboard in nonStarredDashboards"
:key="dashboard.path" :key="dashboard.path"
:is-check-item="true" :is-check-item="true"
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
<span class="gl-overflow-hidden gl-overflow-wrap-break"> <span class="gl-overflow-hidden gl-overflow-wrap-break">
{{ dashboardDisplayName(dashboard) }} {{ dashboardDisplayName(dashboard) }}
</span> </span>
</gl-new-dropdown-item> </gl-dropdown-item>
</div> </div>
<div <div
......
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
GlButtonGroup, GlButtonGroup,
GlButton, GlButton,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlDropdownDivider, GlDropdownDivider,
GlTooltipDirective, GlTooltipDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
GlButtonGroup, GlButtonGroup,
GlButton, GlButton,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlDropdownDivider, GlDropdownDivider,
}, },
directives: { directives: {
...@@ -158,20 +158,20 @@ export default { ...@@ -158,20 +158,20 @@ export default {
:title="s__('Metrics|Set refresh rate')" :title="s__('Metrics|Set refresh rate')"
:text="dropdownText" :text="dropdownText"
> >
<gl-new-dropdown-item <gl-dropdown-item
:is-check-item="true" :is-check-item="true"
:is-checked="refreshInterval === null" :is-checked="refreshInterval === null"
@click="removeRefreshInterval()" @click="removeRefreshInterval()"
>{{ __('Off') }}</gl-new-dropdown-item >{{ __('Off') }}</gl-dropdown-item
> >
<gl-dropdown-divider /> <gl-dropdown-divider />
<gl-new-dropdown-item <gl-dropdown-item
v-for="(option, i) in $options.refreshIntervals" v-for="(option, i) in $options.refreshIntervals"
:key="i" :key="i"
:is-check-item="true" :is-check-item="true"
:is-checked="isChecked(option)" :is-checked="isChecked(option)"
@click="setRefreshInterval(option)" @click="setRefreshInterval(option)"
>{{ option.label }}</gl-new-dropdown-item >{{ option.label }}</gl-dropdown-item
> >
</gl-dropdown> </gl-dropdown>
</gl-button-group> </gl-button-group>
......
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
GlFormSelect, GlFormSelect,
GlLink, GlLink,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlSearchBoxByType, GlSearchBoxByType,
GlSprintf, GlSprintf,
} from '@gitlab/ui'; } from '@gitlab/ui';
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
GlFormSelect, GlFormSelect,
GlLink, GlLink,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlSearchBoxByType, GlSearchBoxByType,
GlSprintf, GlSprintf,
}, },
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
:placeholder="__('Search branches and tags')" :placeholder="__('Search branches and tags')"
class="gl-p-2" class="gl-p-2"
/> />
<gl-new-dropdown-item <gl-dropdown-item
v-for="(ref, index) in filteredRefs" v-for="(ref, index) in filteredRefs"
:key="index" :key="index"
class="gl-font-monospace" class="gl-font-monospace"
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
@click="setRefSelected(ref)" @click="setRefSelected(ref)"
> >
{{ ref }} {{ ref }}
</gl-new-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
<template #description> <template #description>
......
...@@ -4,7 +4,7 @@ import { mapState, mapActions } from 'vuex'; ...@@ -4,7 +4,7 @@ import { mapState, mapActions } from 'vuex';
import { import {
GlDropdown, GlDropdown,
GlNewDropdownHeader, GlNewDropdownHeader,
GlNewDropdownItem, GlDropdownItem,
GlSearchBoxByType, GlSearchBoxByType,
GlDropdownDivider, GlDropdownDivider,
GlTooltipDirective, GlTooltipDirective,
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
components: { components: {
GlDropdown, GlDropdown,
GlNewDropdownHeader, GlNewDropdownHeader,
GlNewDropdownItem, GlDropdownItem,
GlSearchBoxByType, GlSearchBoxByType,
GlDropdownDivider, GlDropdownDivider,
}, },
...@@ -123,11 +123,11 @@ export default { ...@@ -123,11 +123,11 @@ export default {
:placeholder="__('Search')" :placeholder="__('Search')"
@input="searchAuthors" @input="searchAuthors"
/> />
<gl-new-dropdown-item :is-checked="!currentAuthor" @click="selectAuthor(null)"> <gl-dropdown-item :is-checked="!currentAuthor" @click="selectAuthor(null)">
{{ __('Any Author') }} {{ __('Any Author') }}
</gl-new-dropdown-item> </gl-dropdown-item>
<gl-dropdown-divider /> <gl-dropdown-divider />
<gl-new-dropdown-item <gl-dropdown-item
v-for="author in commitsAuthors" v-for="author in commitsAuthors"
:key="author.id" :key="author.id"
:is-checked="author.name === currentAuthor" :is-checked="author.name === currentAuthor"
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
@click="selectAuthor(author)" @click="selectAuthor(author)"
> >
{{ author.name }} {{ author.name }}
</gl-new-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
</div> </div>
</template> </template>
<script> <script>
import { GlNewDropdownHeader, GlNewDropdownItem, GlBadge, GlIcon } from '@gitlab/ui'; import { GlNewDropdownHeader, GlDropdownItem, GlBadge, GlIcon } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
export default { export default {
name: 'RefResultsSection', name: 'RefResultsSection',
components: { components: {
GlNewDropdownHeader, GlNewDropdownHeader,
GlNewDropdownItem, GlDropdownItem,
GlBadge, GlBadge,
GlIcon, GlIcon,
}, },
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
</div> </div>
</template> </template>
<template v-else> <template v-else>
<gl-new-dropdown-item <gl-dropdown-item
v-for="item in items" v-for="item in items"
:key="item.name" :key="item.name"
@click="$emit('selected', item.value || item.name)" @click="$emit('selected', item.value || item.name)"
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
s__('DefaultBranchLabel|default') s__('DefaultBranchLabel|default')
}}</gl-badge> }}</gl-badge>
</div> </div>
</gl-new-dropdown-item> </gl-dropdown-item>
</template> </template>
</div> </div>
</template> </template>
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
GlButton, GlButton,
GlDropdown, GlDropdown,
GlNewDropdownHeader as GlDropdownHeader, GlNewDropdownHeader as GlDropdownHeader,
GlNewDropdownItem as GlDropdownItem, GlDropdownItem,
GlTooltipDirective, GlTooltipDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { n__, s__, sprintf } from '~/locale'; import { n__, s__, sprintf } from '~/locale';
......
...@@ -4,7 +4,7 @@ import { ...@@ -4,7 +4,7 @@ import {
GlButtonGroup, GlButtonGroup,
GlButton, GlButton,
GlDropdown, GlDropdown,
GlNewDropdownItem as GlDropdownItem, GlDropdownItem,
GlTooltipDirective, GlTooltipDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
......
<script> <script>
import { import { GlDropdown, GlNewDropdownHeader as GlDropdownHeader, GlDropdownItem } from '@gitlab/ui';
GlDropdown,
GlNewDropdownHeader as GlDropdownHeader,
GlNewDropdownItem as GlDropdownItem,
} from '@gitlab/ui';
import { sprintf, s__ } from '~/locale'; import { sprintf, s__ } from '~/locale';
export default { export default {
......
...@@ -3,7 +3,7 @@ import { ...@@ -3,7 +3,7 @@ import {
GlAlert, GlAlert,
GlButton, GlButton,
GlDropdown, GlDropdown,
GlNewDropdownItem as GlDropdownItem, GlDropdownItem,
GlDropdownDivider, GlDropdownDivider,
GlForm, GlForm,
GlFormInput, GlFormInput,
......
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
GlAvatar, GlAvatar,
GlDropdown, GlDropdown,
GlNewDropdownHeader as GlDropdownHeader, GlNewDropdownHeader as GlDropdownHeader,
GlNewDropdownItem as GlDropdownItem, GlDropdownItem,
GlSearchBoxByType, GlSearchBoxByType,
GlSafeHtmlDirective as SafeHtml, GlSafeHtmlDirective as SafeHtml,
} from '@gitlab/ui'; } from '@gitlab/ui';
......
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
GlAvatar, GlAvatar,
GlDropdown, GlDropdown,
GlNewDropdownHeader as GlDropdownHeader, GlNewDropdownHeader as GlDropdownHeader,
GlNewDropdownItem as GlDropdownItem, GlDropdownItem,
GlSearchBoxByType, GlSearchBoxByType,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { n__, s__, __ } from '~/locale'; import { n__, s__, __ } from '~/locale';
......
<script> <script>
import { GlDropdown, GlNewDropdownHeader, GlNewDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlNewDropdownHeader, GlDropdownItem } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
const SORTING_TITLE = s__('SortOptions|Sort by:'); const SORTING_TITLE = s__('SortOptions|Sort by:');
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
components: { components: {
GlDropdown, GlDropdown,
GlNewDropdownHeader, GlNewDropdownHeader,
GlNewDropdownItem, GlDropdownItem,
}, },
props: { props: {
sortBy: { sortBy: {
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
<div> <div>
<gl-dropdown :text="selectedOption.text" class="w-100 flex-column flex-lg-row form-group"> <gl-dropdown :text="selectedOption.text" class="w-100 flex-column flex-lg-row form-group">
<gl-new-dropdown-header> {{ $options.SORTING_TITLE }}</gl-new-dropdown-header> <gl-new-dropdown-header> {{ $options.SORTING_TITLE }}</gl-new-dropdown-header>
<gl-new-dropdown-item <gl-dropdown-item
v-for="option in $options.SORTING_OPTIONS" v-for="option in $options.SORTING_OPTIONS"
:key="option.key" :key="option.key"
:is-check-item="true" :is-check-item="true"
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
@click="onItemClick(option.key)" @click="onItemClick(option.key)"
> >
{{ option.text }} {{ option.text }}
</gl-new-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
export default { export default {
......
...@@ -3,7 +3,7 @@ import { debounce } from 'lodash'; ...@@ -3,7 +3,7 @@ import { debounce } from 'lodash';
import { import {
GlDropdown, GlDropdown,
GlDropdownDivider, GlDropdownDivider,
GlNewDropdownItem, GlDropdownItem,
GlIcon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
GlSearchBoxByType, GlSearchBoxByType,
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
components: { components: {
GlDropdown, GlDropdown,
GlDropdownDivider, GlDropdownDivider,
GlNewDropdownItem, GlDropdownItem,
GlSearchBoxByType, GlSearchBoxByType,
GlIcon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
...@@ -85,22 +85,22 @@ export default { ...@@ -85,22 +85,22 @@ export default {
@keyup="fetchEnvironments" @keyup="fetchEnvironments"
/> />
<gl-loading-icon v-if="isLoading" /> <gl-loading-icon v-if="isLoading" />
<gl-new-dropdown-item <gl-dropdown-item
v-for="environment in results" v-for="environment in results"
v-else-if="results.length" v-else-if="results.length"
:key="environment" :key="environment"
@click="addEnvironment(environment)" @click="addEnvironment(environment)"
> >
{{ environment }} {{ environment }}
</gl-new-dropdown-item> </gl-dropdown-item>
<template v-else-if="environmentSearch.length"> <template v-else-if="environmentSearch.length">
<span ref="noResults" class="text-secondary gl-p-3"> <span ref="noResults" class="text-secondary gl-p-3">
{{ $options.translations.noMatchingResults }} {{ $options.translations.noMatchingResults }}
</span> </span>
<gl-dropdown-divider /> <gl-dropdown-divider />
<gl-new-dropdown-item @click="addEnvironment(environmentSearch)"> <gl-dropdown-item @click="addEnvironment(environmentSearch)">
{{ createEnvironmentLabel }} {{ createEnvironmentLabel }}
</gl-new-dropdown-item> </gl-dropdown-item>
</template> </template>
</gl-dropdown> </gl-dropdown>
</template> </template>
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
GlEmptyState, GlEmptyState,
GlIcon, GlIcon,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { formatDate } from '~/lib/utils/datetime_utility'; import { formatDate } from '~/lib/utils/datetime_utility';
import { __ } from '~/locale'; import { __ } from '~/locale';
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
GlEmptyState, GlEmptyState,
GlIcon, GlIcon,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
IterationForm, IterationForm,
IterationReportSummary, IterationReportSummary,
IterationReportTabs, IterationReportTabs,
...@@ -205,9 +205,7 @@ export default { ...@@ -205,9 +205,7 @@ export default {
<template #button-content> <template #button-content>
<gl-icon name="ellipsis_v" /><span class="gl-sr-only">{{ __('Actions') }}</span> <gl-icon name="ellipsis_v" /><span class="gl-sr-only">{{ __('Actions') }}</span>
</template> </template>
<gl-new-dropdown-item @click="loadEditPage">{{ <gl-dropdown-item @click="loadEditPage">{{ __('Edit iteration') }}</gl-dropdown-item>
__('Edit iteration')
}}</gl-new-dropdown-item>
</gl-dropdown> </gl-dropdown>
</div> </div>
<h3 ref="title" class="page-title">{{ iteration.title }}</h3> <h3 ref="title" class="page-title">{{ iteration.title }}</h3>
......
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
GlIcon, GlIcon,
GlLink, GlLink,
GlDropdown, GlDropdown,
GlNewDropdownItem as GlDropdownItem, GlDropdownItem,
GlSkeletonLoader, GlSkeletonLoader,
GlSprintf, GlSprintf,
GlTooltipDirective, GlTooltipDirective,
......
<script> <script>
import { GlDropdown, GlNewDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
export default { export default {
components: { components: {
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
}, },
props: { props: {
visibilityLevelOptions: { visibilityLevelOptions: {
...@@ -35,14 +35,14 @@ export default { ...@@ -35,14 +35,14 @@ export default {
<div> <div>
<input type="hidden" name="group[visibility_level]" :value="selectedOption.level" /> <input type="hidden" name="group[visibility_level]" :value="selectedOption.level" />
<gl-dropdown :text="selectedOption.label" class="gl-w-full" menu-class="gl-w-full! gl-mb-0"> <gl-dropdown :text="selectedOption.label" class="gl-w-full" menu-class="gl-w-full! gl-mb-0">
<gl-new-dropdown-item <gl-dropdown-item
v-for="option in visibilityLevelOptions" v-for="option in visibilityLevelOptions"
:key="option.level" :key="option.level"
:secondary-text="option.description" :secondary-text="option.description"
@click="onClick(option)" @click="onClick(option)"
> >
<div class="gl-font-weight-bold gl-mb-1">{{ option.label }}</div> <div class="gl-font-weight-bold gl-mb-1">{{ option.label }}</div>
</gl-new-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
</div> </div>
</template> </template>
...@@ -4,7 +4,7 @@ import { ...@@ -4,7 +4,7 @@ import {
GlFormGroup, GlFormGroup,
GlSegmentedControl, GlSegmentedControl,
GlDropdown, GlDropdown,
GlNewDropdownItem as GlDropdownItem, GlDropdownItem,
GlDropdownDivider, GlDropdownDivider,
} from '@gitlab/ui'; } from '@gitlab/ui';
......
...@@ -3,7 +3,7 @@ import { ...@@ -3,7 +3,7 @@ import {
GlButton, GlButton,
GlLink, GlLink,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlSearchBoxByType, GlSearchBoxByType,
GlNewDropdownHeader, GlNewDropdownHeader,
GlIcon, GlIcon,
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
GlButton, GlButton,
GlLink, GlLink,
GlDropdown, GlDropdown,
GlNewDropdownItem, GlDropdownItem,
GlSearchBoxByType, GlSearchBoxByType,
GlNewDropdownHeader, GlNewDropdownHeader,
GlIcon, GlIcon,
...@@ -199,13 +199,13 @@ export default { ...@@ -199,13 +199,13 @@ export default {
__('Assign Iteration') __('Assign Iteration')
}}</gl-new-dropdown-header> }}</gl-new-dropdown-header>
<gl-search-box-by-type ref="search" v-model="searchTerm" class="gl-m-3" /> <gl-search-box-by-type ref="search" v-model="searchTerm" class="gl-m-3" />
<gl-new-dropdown-item <gl-dropdown-item
v-for="iterationItem in iterations" v-for="iterationItem in iterations"
:key="iterationItem.id" :key="iterationItem.id"
:is-check-item="true" :is-check-item="true"
:is-checked="isIterationChecked(iterationItem.id)" :is-checked="isIterationChecked(iterationItem.id)"
@click="setIteration(iterationItem.id)" @click="setIteration(iterationItem.id)"
>{{ iterationItem.title }}</gl-new-dropdown-item >{{ iterationItem.title }}</gl-dropdown-item
> >
</gl-dropdown> </gl-dropdown>
</div> </div>
......
<script> <script>
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { sprintf, s__ } from '~/locale'; import { sprintf, s__ } from '~/locale';
import { EntityTypes } from './constants'; import { EntityTypes } from './constants';
......
import Vuex from 'vuex'; import Vuex from 'vuex';
import { shallowMount, mount, createLocalVue } from '@vue/test-utils'; import { shallowMount, mount, createLocalVue } from '@vue/test-utils';
import { GlNewDropdownItem } from '@gitlab/ui'; import { GlDropdownItem } from '@gitlab/ui';
import Scatterplot from 'ee/analytics/shared/components/scatterplot.vue'; import Scatterplot from 'ee/analytics/shared/components/scatterplot.vue';
import DurationChart from 'ee/analytics/cycle_analytics/components/duration_chart.vue'; import DurationChart from 'ee/analytics/cycle_analytics/components/duration_chart.vue';
import StageDropdownFilter from 'ee/analytics/cycle_analytics/components/stage_dropdown_filter.vue'; import StageDropdownFilter from 'ee/analytics/cycle_analytics/components/stage_dropdown_filter.vue';
...@@ -66,7 +66,7 @@ describe('DurationChart', () => { ...@@ -66,7 +66,7 @@ describe('DurationChart', () => {
const selectStage = (_wrapper, index = 0) => { const selectStage = (_wrapper, index = 0) => {
findStageDropdown(_wrapper) findStageDropdown(_wrapper)
.findAll(GlNewDropdownItem) .findAll(GlDropdownItem)
.at(index) .at(index)
.vm.$emit('click'); .vm.$emit('click');
}; };
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import StageDropdownFilter from 'ee/analytics/cycle_analytics/components/stage_dropdown_filter.vue'; import StageDropdownFilter from 'ee/analytics/cycle_analytics/components/stage_dropdown_filter.vue';
const stages = [ const stages = [
......
import { GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlDropdownItem } from '@gitlab/ui';
export function renderTotalTime(selector, element, totalTime = {}) { export function renderTotalTime(selector, element, totalTime = {}) {
const { days, hours, mins, seconds } = totalTime; const { days, hours, mins, seconds } = totalTime;
......
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import GroupsDropdownFilter from 'ee/analytics/shared/components/groups_dropdown_filter.vue'; import GroupsDropdownFilter from 'ee/analytics/shared/components/groups_dropdown_filter.vue';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import Api from '~/api'; import Api from '~/api';
......
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import ProjectsDropdownFilter from 'ee/analytics/shared/components/projects_dropdown_filter.vue'; import ProjectsDropdownFilter from 'ee/analytics/shared/components/projects_dropdown_filter.vue';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { LAST_ACTIVITY_AT } from 'ee/analytics/shared/constants'; import { LAST_ACTIVITY_AT } from 'ee/analytics/shared/constants';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import Api from '~/api'; import Api from '~/api';
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlNewDropdownItem } from '@gitlab/ui'; import { GlDropdownItem } from '@gitlab/ui';
import SortingField from 'ee/audit_events/components/sorting_field.vue'; import SortingField from 'ee/audit_events/components/sorting_field.vue';
describe('SortingField component', () => { describe('SortingField component', () => {
...@@ -10,13 +10,13 @@ describe('SortingField component', () => { ...@@ -10,13 +10,13 @@ describe('SortingField component', () => {
propsData: { ...props }, propsData: { ...props },
stubs: { stubs: {
GlNewDropdown: true, GlNewDropdown: true,
GlNewDropdownItem: true, GlDropdownItem: true,
}, },
}); });
}; };
const getCheckedOptions = () => const getCheckedOptions = () =>
wrapper.findAll(GlNewDropdownItem).filter(item => item.props().isChecked); wrapper.findAll(GlDropdownItem).filter(item => item.props().isChecked);
beforeEach(() => { beforeEach(() => {
initComponent(); initComponent();
...@@ -29,7 +29,7 @@ describe('SortingField component', () => { ...@@ -29,7 +29,7 @@ describe('SortingField component', () => {
describe('when initialized', () => { describe('when initialized', () => {
it('should have sorting options', () => { it('should have sorting options', () => {
expect(wrapper.findAll(GlNewDropdownItem)).toHaveLength(2); expect(wrapper.findAll(GlDropdownItem)).toHaveLength(2);
}); });
it('should set the sorting option to `created_desc` by default', () => { it('should set the sorting option to `created_desc` by default', () => {
...@@ -58,7 +58,7 @@ describe('SortingField component', () => { ...@@ -58,7 +58,7 @@ describe('SortingField component', () => {
beforeEach(() => { beforeEach(() => {
initComponent(); initComponent();
wrapper wrapper
.findAll(GlNewDropdownItem) .findAll(GlDropdownItem)
.at(1) .at(1)
.vm.$emit('click'); .vm.$emit('click');
}); });
......
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import ToggleEpicsSwimlanes from 'ee/boards/components/toggle_epics_swimlanes.vue'; import ToggleEpicsSwimlanes from 'ee/boards/components/toggle_epics_swimlanes.vue';
Vue.use(Vuex); Vue.use(Vuex);
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import { GlLoadingIcon, GlSearchBoxByType, GlNewDropdownItem } from '@gitlab/ui'; import { GlLoadingIcon, GlSearchBoxByType, GlDropdownItem } from '@gitlab/ui';
import NewEnvironmentsDropdown from 'ee/feature_flags/components/new_environments_dropdown.vue'; import NewEnvironmentsDropdown from 'ee/feature_flags/components/new_environments_dropdown.vue';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import httpStatusCodes from '~/lib/utils/http_status'; import httpStatusCodes from '~/lib/utils/http_status';
...@@ -36,7 +36,7 @@ describe('New Environments Dropdown', () => { ...@@ -36,7 +36,7 @@ describe('New Environments Dropdown', () => {
it('should not show any dropdown items', () => { it('should not show any dropdown items', () => {
axiosMock.onGet(TEST_HOST).reply(() => { axiosMock.onGet(TEST_HOST).reply(() => {
expect(wrapper.findAll(GlNewDropdownItem)).toHaveLength(0); expect(wrapper.findAll(GlDropdownItem)).toHaveLength(0);
}); });
wrapper.find(GlSearchBoxByType).vm.$emit('focus'); wrapper.find(GlSearchBoxByType).vm.$emit('focus');
return axios.waitForAll(); return axios.waitForAll();
...@@ -53,7 +53,7 @@ describe('New Environments Dropdown', () => { ...@@ -53,7 +53,7 @@ describe('New Environments Dropdown', () => {
.waitForAll() .waitForAll()
.then(() => wrapper.vm.$nextTick()) .then(() => wrapper.vm.$nextTick())
.then(() => { .then(() => {
item = wrapper.find(GlNewDropdownItem); item = wrapper.find(GlDropdownItem);
}); });
}); });
...@@ -78,7 +78,7 @@ describe('New Environments Dropdown', () => { ...@@ -78,7 +78,7 @@ describe('New Environments Dropdown', () => {
wrapper.find(GlSearchBoxByType).vm.$emit('focus'); wrapper.find(GlSearchBoxByType).vm.$emit('focus');
wrapper.find(GlSearchBoxByType).vm.$emit('input', 'prod'); wrapper.find(GlSearchBoxByType).vm.$emit('input', 'prod');
return axios.waitForAll().then(() => { return axios.waitForAll().then(() => {
items = wrapper.findAll(GlNewDropdownItem); items = wrapper.findAll(GlDropdownItem);
}); });
}); });
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { import { GlDropdown, GlDropdownItem, GlEmptyState, GlLoadingIcon, GlTab, GlTabs } from '@gitlab/ui';
GlDropdown,
GlNewDropdownItem,
GlEmptyState,
GlLoadingIcon,
GlTab,
GlTabs,
} from '@gitlab/ui';
import IterationReport from 'ee/iterations/components/iteration_report.vue'; import IterationReport from 'ee/iterations/components/iteration_report.vue';
import IterationForm from 'ee/iterations/components/iteration_form.vue'; import IterationForm from 'ee/iterations/components/iteration_form.vue';
import IterationReportSummary from 'ee/iterations/components/iteration_report_summary.vue'; import IterationReportSummary from 'ee/iterations/components/iteration_report_summary.vue';
...@@ -26,7 +19,7 @@ describe('Iterations report', () => { ...@@ -26,7 +19,7 @@ describe('Iterations report', () => {
const findActionsDropdown = () => wrapper.find('[data-testid="actions-dropdown"]'); const findActionsDropdown = () => wrapper.find('[data-testid="actions-dropdown"]');
const clickEditButton = () => { const clickEditButton = () => {
findActionsDropdown().vm.$emit('click'); findActionsDropdown().vm.$emit('click');
wrapper.find(GlNewDropdownItem).vm.$emit('click'); wrapper.find(GlDropdownItem).vm.$emit('click');
}; };
const mountComponent = ({ props = defaultProps, loading = false } = {}) => { const mountComponent = ({ props = defaultProps, loading = false } = {}) => {
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDropdown, GlNewDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import Component from 'ee/registrations/components/visibility_level_dropdown.vue'; import Component from 'ee/registrations/components/visibility_level_dropdown.vue';
describe('Visibility Level Dropdown', () => { describe('Visibility Level Dropdown', () => {
...@@ -33,7 +33,7 @@ describe('Visibility Level Dropdown', () => { ...@@ -33,7 +33,7 @@ describe('Visibility Level Dropdown', () => {
wrapper.find("input[name='group[visibility_level]']").attributes('value'); wrapper.find("input[name='group[visibility_level]']").attributes('value');
const dropdownText = () => wrapper.find(GlDropdown).props('text'); const dropdownText = () => wrapper.find(GlDropdown).props('text');
const findDropdownItems = () => const findDropdownItems = () =>
wrapper.findAll(GlNewDropdownItem).wrappers.map(option => ({ wrapper.findAll(GlDropdownItem).wrappers.map(option => ({
text: option.text(), text: option.text(),
secondaryText: option.props('secondaryText'), secondaryText: option.props('secondaryText'),
})); }));
...@@ -57,7 +57,7 @@ describe('Visibility Level Dropdown', () => { ...@@ -57,7 +57,7 @@ describe('Visibility Level Dropdown', () => {
describe('Selecting an option', () => { describe('Selecting an option', () => {
beforeEach(() => { beforeEach(() => {
wrapper wrapper
.findAll(GlNewDropdownItem) .findAll(GlDropdownItem)
.at(1) .at(1)
.vm.$emit('click'); .vm.$emit('click');
}); });
......
import Vuex from 'vuex'; import Vuex from 'vuex';
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount, createLocalVue } from '@vue/test-utils';
import { GlSegmentedControl, GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlSegmentedControl, GlDropdown, GlDropdownItem } from '@gitlab/ui';
import RoadmapFilters from 'ee/roadmap/components/roadmap_filters.vue'; import RoadmapFilters from 'ee/roadmap/components/roadmap_filters.vue';
import createStore from 'ee/roadmap/store'; import createStore from 'ee/roadmap/store';
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDropdown, GlNewDropdownItem, GlButton, GlLink, GlSearchBoxByType } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem, GlButton, GlLink, GlSearchBoxByType } from '@gitlab/ui';
import IterationSelect from 'ee/sidebar/components/iteration_select.vue'; import IterationSelect from 'ee/sidebar/components/iteration_select.vue';
import { iterationSelectTextMap } from 'ee/sidebar/constants'; import { iterationSelectTextMap } from 'ee/sidebar/constants';
import setIterationOnIssue from 'ee/sidebar/queries/set_iteration_on_issue.mutation.graphql'; import setIterationOnIssue from 'ee/sidebar/queries/set_iteration_on_issue.mutation.graphql';
...@@ -141,7 +141,7 @@ describe('IterationSelect', () => { ...@@ -141,7 +141,7 @@ describe('IterationSelect', () => {
it('renders title $title', () => { it('renders title $title', () => {
expect( expect(
wrapper wrapper
.findAll(GlNewDropdownItem) .findAll(GlDropdownItem)
.filter(w => w.text() === title) .filter(w => w.text() === title)
.at(0) .at(0)
.text(), .text(),
...@@ -151,7 +151,7 @@ describe('IterationSelect', () => { ...@@ -151,7 +151,7 @@ describe('IterationSelect', () => {
it('checks the correct dropdown item', () => { it('checks the correct dropdown item', () => {
expect( expect(
wrapper wrapper
.findAll(GlNewDropdownItem) .findAll(GlDropdownItem)
.filter(w => w.props('isChecked') === true) .filter(w => w.props('isChecked') === true)
.at(0) .at(0)
.text(), .text(),
...@@ -164,12 +164,12 @@ describe('IterationSelect', () => { ...@@ -164,12 +164,12 @@ describe('IterationSelect', () => {
createComponent({}); createComponent({});
}); });
it('finds GlNewDropdownItem with "No iteration"', () => { it('finds GlDropdownItem with "No iteration"', () => {
expect(wrapper.find(GlNewDropdownItem).text()).toBe('No iteration'); expect(wrapper.find(GlDropdownItem).text()).toBe('No iteration');
}); });
it('"No iteration" is checked', () => { it('"No iteration" is checked', () => {
expect(wrapper.find(GlNewDropdownItem).props('isChecked')).toBe(true); expect(wrapper.find(GlDropdownItem).props('isChecked')).toBe(true);
}); });
}); });
...@@ -181,7 +181,7 @@ describe('IterationSelect', () => { ...@@ -181,7 +181,7 @@ describe('IterationSelect', () => {
}); });
wrapper wrapper
.findAll(GlNewDropdownItem) .findAll(GlDropdownItem)
.filter(w => w.text() === 'title') .filter(w => w.text() === 'title')
.at(0) .at(0)
.vm.$emit('click'); .vm.$emit('click');
...@@ -201,7 +201,7 @@ describe('IterationSelect', () => { ...@@ -201,7 +201,7 @@ describe('IterationSelect', () => {
}); });
wrapper wrapper
.findAll(GlNewDropdownItem) .findAll(GlDropdownItem)
.filter(w => w.text() === 'title') .filter(w => w.text() === 'title')
.at(0) .at(0)
.vm.$emit('click'); .vm.$emit('click');
...@@ -241,7 +241,7 @@ describe('IterationSelect', () => { ...@@ -241,7 +241,7 @@ describe('IterationSelect', () => {
bootstrapComponent(mutationResp); bootstrapComponent(mutationResp);
wrapper wrapper
.findAll(GlNewDropdownItem) .findAll(GlDropdownItem)
.filter(w => w.text() === 'title') .filter(w => w.text() === 'title')
.at(0) .at(0)
.vm.$emit('click'); .vm.$emit('click');
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import PolicyRuleEntity from 'ee/threat_monitoring/components/policy_editor/policy_rule_entity.vue'; import PolicyRuleEntity from 'ee/threat_monitoring/components/policy_editor/policy_rule_entity.vue';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { EntityTypes } from 'ee/threat_monitoring/components/policy_editor/constants'; import { EntityTypes } from 'ee/threat_monitoring/components/policy_editor/constants';
describe('PolicyRuleEntity component', () => { describe('PolicyRuleEntity component', () => {
......
...@@ -10,7 +10,7 @@ exports[`Design management design version dropdown component renders design vers ...@@ -10,7 +10,7 @@ exports[`Design management design version dropdown component renders design vers
text="Showing latest version" text="Showing latest version"
variant="default" variant="default"
> >
<gl-new-dropdown-item-stub <gl-dropdown-item-stub
avatarurl="" avatarurl=""
iconcolor="" iconcolor=""
iconname="" iconname=""
...@@ -22,8 +22,8 @@ exports[`Design management design version dropdown component renders design vers ...@@ -22,8 +22,8 @@ exports[`Design management design version dropdown component renders design vers
Version Version
2 2
(latest) (latest)
</gl-new-dropdown-item-stub> </gl-dropdown-item-stub>
<gl-new-dropdown-item-stub <gl-dropdown-item-stub
avatarurl="" avatarurl=""
iconcolor="" iconcolor=""
iconname="" iconname=""
...@@ -34,7 +34,7 @@ exports[`Design management design version dropdown component renders design vers ...@@ -34,7 +34,7 @@ exports[`Design management design version dropdown component renders design vers
Version Version
1 1
</gl-new-dropdown-item-stub> </gl-dropdown-item-stub>
</gl-dropdown-stub> </gl-dropdown-stub>
`; `;
...@@ -48,7 +48,7 @@ exports[`Design management design version dropdown component renders design vers ...@@ -48,7 +48,7 @@ exports[`Design management design version dropdown component renders design vers
text="Showing latest version" text="Showing latest version"
variant="default" variant="default"
> >
<gl-new-dropdown-item-stub <gl-dropdown-item-stub
avatarurl="" avatarurl=""
iconcolor="" iconcolor=""
iconname="" iconname=""
...@@ -60,8 +60,8 @@ exports[`Design management design version dropdown component renders design vers ...@@ -60,8 +60,8 @@ exports[`Design management design version dropdown component renders design vers
Version Version
2 2
(latest) (latest)
</gl-new-dropdown-item-stub> </gl-dropdown-item-stub>
<gl-new-dropdown-item-stub <gl-dropdown-item-stub
avatarurl="" avatarurl=""
iconcolor="" iconcolor=""
iconname="" iconname=""
...@@ -72,6 +72,6 @@ exports[`Design management design version dropdown component renders design vers ...@@ -72,6 +72,6 @@ exports[`Design management design version dropdown component renders design vers
Version Version
1 1
</gl-new-dropdown-item-stub> </gl-dropdown-item-stub>
</gl-dropdown-stub> </gl-dropdown-stub>
`; `;
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDropdown, GlNewDropdownItem, GlSprintf } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem, GlSprintf } from '@gitlab/ui';
import DesignVersionDropdown from '~/design_management/components/upload/design_version_dropdown.vue'; import DesignVersionDropdown from '~/design_management/components/upload/design_version_dropdown.vue';
import mockAllVersions from './mock_data/all_versions'; import mockAllVersions from './mock_data/all_versions';
...@@ -42,7 +42,7 @@ describe('Design management design version dropdown component', () => { ...@@ -42,7 +42,7 @@ describe('Design management design version dropdown component', () => {
wrapper.destroy(); wrapper.destroy();
}); });
const findVersionLink = index => wrapper.findAll(GlNewDropdownItem).at(index); const findVersionLink = index => wrapper.findAll(GlDropdownItem).at(index);
it('renders design version dropdown button', () => { it('renders design version dropdown button', () => {
createComponent(); createComponent();
...@@ -107,7 +107,7 @@ describe('Design management design version dropdown component', () => { ...@@ -107,7 +107,7 @@ describe('Design management design version dropdown component', () => {
createComponent(); createComponent();
return wrapper.vm.$nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
expect(wrapper.findAll(GlNewDropdownItem)).toHaveLength(wrapper.vm.allVersions.length); expect(wrapper.findAll(GlDropdownItem)).toHaveLength(wrapper.vm.allVersions.length);
}); });
}); });
}); });
......
...@@ -55,7 +55,7 @@ exports[`Alert integration settings form default state should match the default ...@@ -55,7 +55,7 @@ exports[`Alert integration settings form default state should match the default
text="selecte_tmpl" text="selecte_tmpl"
variant="default" variant="default"
> >
<gl-new-dropdown-item-stub <gl-dropdown-item-stub
avatarurl="" avatarurl=""
data-qa-selector="incident_templates_item" data-qa-selector="incident_templates_item"
iconcolor="" iconcolor=""
...@@ -67,7 +67,7 @@ exports[`Alert integration settings form default state should match the default ...@@ -67,7 +67,7 @@ exports[`Alert integration settings form default state should match the default
No template selected No template selected
</gl-new-dropdown-item-stub> </gl-dropdown-item-stub>
</gl-dropdown-stub> </gl-dropdown-stub>
</gl-form-group-stub> </gl-form-group-stub>
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlNewDropdownItem } from '@gitlab/ui'; import { GlDropdownItem } from '@gitlab/ui';
import { createStore } from '~/monitoring/stores'; import { createStore } from '~/monitoring/stores';
import { DASHBOARD_PAGE, PANEL_NEW_PAGE } from '~/monitoring/router/constants'; import { DASHBOARD_PAGE, PANEL_NEW_PAGE } from '~/monitoring/router/constants';
import { setupAllDashboards, setupStoreWithData } from '../store_utils'; import { setupAllDashboards, setupStoreWithData } from '../store_utils';
...@@ -146,8 +146,8 @@ describe('Actions menu', () => { ...@@ -146,8 +146,8 @@ describe('Actions menu', () => {
}); });
describe('add panel item', () => { describe('add panel item', () => {
const GlNewDropdownItemStub = { const GlDropdownItemStub = {
extends: GlNewDropdownItem, extends: GlDropdownItem,
props: { props: {
to: [String, Object], to: [String, Object],
}, },
...@@ -164,7 +164,7 @@ describe('Actions menu', () => { ...@@ -164,7 +164,7 @@ describe('Actions menu', () => {
}, },
{ {
mocks: { $route }, mocks: { $route },
stubs: { GlNewDropdownItem: GlNewDropdownItemStub }, stubs: { GlDropdownItem: GlDropdownItemStub },
}, },
); );
}); });
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlNewDropdownItem, GlSearchBoxByType, GlLoadingIcon, GlButton } from '@gitlab/ui'; import { GlDropdownItem, GlSearchBoxByType, GlLoadingIcon, GlButton } from '@gitlab/ui';
import { createStore } from '~/monitoring/stores'; import { createStore } from '~/monitoring/stores';
import * as types from '~/monitoring/stores/mutation_types'; import * as types from '~/monitoring/stores/mutation_types';
import DateTimePicker from '~/vue_shared/components/date_time_picker/date_time_picker.vue'; import DateTimePicker from '~/vue_shared/components/date_time_picker/date_time_picker.vue';
...@@ -31,7 +31,7 @@ describe('Dashboard header', () => { ...@@ -31,7 +31,7 @@ describe('Dashboard header', () => {
const findDashboardDropdown = () => wrapper.find(DashboardsDropdown); const findDashboardDropdown = () => wrapper.find(DashboardsDropdown);
const findEnvsDropdown = () => wrapper.find({ ref: 'monitorEnvironmentsDropdown' }); const findEnvsDropdown = () => wrapper.find({ ref: 'monitorEnvironmentsDropdown' });
const findEnvsDropdownItems = () => findEnvsDropdown().findAll(GlNewDropdownItem); const findEnvsDropdownItems = () => findEnvsDropdown().findAll(GlDropdownItem);
const findEnvsDropdownSearch = () => findEnvsDropdown().find(GlSearchBoxByType); const findEnvsDropdownSearch = () => findEnvsDropdown().find(GlSearchBoxByType);
const findEnvsDropdownSearchMsg = () => wrapper.find({ ref: 'monitorEnvironmentsDropdownMsg' }); const findEnvsDropdownSearchMsg = () => wrapper.find({ ref: 'monitorEnvironmentsDropdownMsg' });
const findEnvsDropdownLoadingIcon = () => findEnvsDropdown().find(GlLoadingIcon); const findEnvsDropdownLoadingIcon = () => findEnvsDropdown().find(GlLoadingIcon);
......
...@@ -2,7 +2,7 @@ import Vuex from 'vuex'; ...@@ -2,7 +2,7 @@ import Vuex from 'vuex';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import AxiosMockAdapter from 'axios-mock-adapter'; import AxiosMockAdapter from 'axios-mock-adapter';
import { setTestTimeout } from 'helpers/timeout'; import { setTestTimeout } from 'helpers/timeout';
import { GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui'; import { GlDropdownItem } from '@gitlab/ui';
import invalidUrl from '~/lib/utils/invalid_url'; import invalidUrl from '~/lib/utils/invalid_url';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import AlertWidget from '~/monitoring/components/alert_widget.vue'; import AlertWidget from '~/monitoring/components/alert_widget.vue';
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlNewDropdownItem, GlIcon } from '@gitlab/ui'; import { GlDropdownItem, GlIcon } from '@gitlab/ui';
import DashboardsDropdown from '~/monitoring/components/dashboards_dropdown.vue'; import DashboardsDropdown from '~/monitoring/components/dashboards_dropdown.vue';
...@@ -33,8 +33,8 @@ describe('DashboardsDropdown', () => { ...@@ -33,8 +33,8 @@ describe('DashboardsDropdown', () => {
}); });
} }
const findItems = () => wrapper.findAll(GlNewDropdownItem); const findItems = () => wrapper.findAll(GlDropdownItem);
const findItemAt = i => wrapper.findAll(GlNewDropdownItem).at(i); const findItemAt = i => wrapper.findAll(GlDropdownItem).at(i);
const findSearchInput = () => wrapper.find({ ref: 'monitorDashboardsDropdownSearch' }); const findSearchInput = () => wrapper.find({ ref: 'monitorDashboardsDropdownSearch' });
const findNoItemsMsg = () => wrapper.find({ ref: 'monitorDashboardsDropdownMsg' }); const findNoItemsMsg = () => wrapper.find({ ref: 'monitorDashboardsDropdownMsg' });
const findStarredListDivider = () => wrapper.find({ ref: 'starredListDivider' }); const findStarredListDivider = () => wrapper.find({ ref: 'starredListDivider' });
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Visibility from 'visibilityjs'; import Visibility from 'visibilityjs';
import { GlDropdown, GlNewDropdownItem, GlButton } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem, GlButton } from '@gitlab/ui';
import { createStore } from '~/monitoring/stores'; import { createStore } from '~/monitoring/stores';
import RefreshButton from '~/monitoring/components/refresh_button.vue'; import RefreshButton from '~/monitoring/components/refresh_button.vue';
...@@ -16,7 +16,7 @@ describe('RefreshButton', () => { ...@@ -16,7 +16,7 @@ describe('RefreshButton', () => {
const findRefreshBtn = () => wrapper.find(GlButton); const findRefreshBtn = () => wrapper.find(GlButton);
const findDropdown = () => wrapper.find(GlDropdown); const findDropdown = () => wrapper.find(GlDropdown);
const findOptions = () => findDropdown().findAll(GlNewDropdownItem); const findOptions = () => findDropdown().findAll(GlDropdownItem);
const findOptionAt = index => findOptions().at(index); const findOptionAt = index => findOptions().at(index);
const expectFetchDataToHaveBeenCalledTimes = times => { const expectFetchDataToHaveBeenCalledTimes = times => {
......
import { mount, shallowMount } from '@vue/test-utils'; import { mount, shallowMount } from '@vue/test-utils';
import { GlDropdown, GlNewDropdownItem, GlForm } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem, GlForm } from '@gitlab/ui';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
...@@ -24,7 +24,7 @@ describe('Pipeline New Form', () => { ...@@ -24,7 +24,7 @@ describe('Pipeline New Form', () => {
const findForm = () => wrapper.find(GlForm); const findForm = () => wrapper.find(GlForm);
const findDropdown = () => wrapper.find(GlDropdown); const findDropdown = () => wrapper.find(GlDropdown);
const findDropdownItems = () => wrapper.findAll(GlNewDropdownItem); const findDropdownItems = () => wrapper.findAll(GlDropdownItem);
const findVariableRows = () => wrapper.findAll('[data-testid="ci-variable-row"]'); const findVariableRows = () => wrapper.findAll('[data-testid="ci-variable-row"]');
const findRemoveIcons = () => wrapper.findAll('[data-testid="remove-ci-variable-row"]'); const findRemoveIcons = () => wrapper.findAll('[data-testid="remove-ci-variable-row"]');
const findKeyInputs = () => wrapper.findAll('[data-testid="pipeline-form-ci-variable-key"]'); const findKeyInputs = () => wrapper.findAll('[data-testid="pipeline-form-ci-variable-key"]');
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { GlDropdown, GlNewDropdownHeader, GlSearchBoxByType, GlNewDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlNewDropdownHeader, GlSearchBoxByType, GlDropdownItem } from '@gitlab/ui';
import * as urlUtility from '~/lib/utils/url_utility'; import * as urlUtility from '~/lib/utils/url_utility';
import AuthorSelect from '~/projects/commits/components/author_select.vue'; import AuthorSelect from '~/projects/commits/components/author_select.vue';
import { createStore } from '~/projects/commits/store'; import { createStore } from '~/projects/commits/store';
...@@ -61,7 +61,7 @@ describe('Author Select', () => { ...@@ -61,7 +61,7 @@ describe('Author Select', () => {
const findDropdown = () => wrapper.find(GlDropdown); const findDropdown = () => wrapper.find(GlDropdown);
const findDropdownHeader = () => wrapper.find(GlNewDropdownHeader); const findDropdownHeader = () => wrapper.find(GlNewDropdownHeader);
const findSearchBox = () => wrapper.find(GlSearchBoxByType); const findSearchBox = () => wrapper.find(GlSearchBoxByType);
const findDropdownItems = () => wrapper.findAll(GlNewDropdownItem); const findDropdownItems = () => wrapper.findAll(GlDropdownItem);
describe('user is searching via "filter by commit message"', () => { describe('user is searching via "filter by commit message"', () => {
it('disables dropdown container', () => { it('disables dropdown container', () => {
......
...@@ -2,7 +2,7 @@ import Vuex from 'vuex'; ...@@ -2,7 +2,7 @@ import Vuex from 'vuex';
import { mount, createLocalVue } from '@vue/test-utils'; import { mount, createLocalVue } from '@vue/test-utils';
import axios from 'axios'; import axios from 'axios';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import { GlLoadingIcon, GlSearchBoxByType, GlNewDropdownItem, GlIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlSearchBoxByType, GlDropdownItem, GlIcon } from '@gitlab/ui';
import { trimText } from 'helpers/text_helper'; import { trimText } from 'helpers/text_helper';
import { sprintf } from '~/locale'; import { sprintf } from '~/locale';
import { ENTER_KEY } from '~/lib/utils/keys'; import { ENTER_KEY } from '~/lib/utils/keys';
...@@ -87,15 +87,15 @@ describe('Ref selector component', () => { ...@@ -87,15 +87,15 @@ describe('Ref selector component', () => {
const findSearchBox = () => wrapper.find(GlSearchBoxByType); const findSearchBox = () => wrapper.find(GlSearchBoxByType);
const findBranchesSection = () => wrapper.find('[data-testid="branches-section"]'); const findBranchesSection = () => wrapper.find('[data-testid="branches-section"]');
const findBranchDropdownItems = () => findBranchesSection().findAll(GlNewDropdownItem); const findBranchDropdownItems = () => findBranchesSection().findAll(GlDropdownItem);
const findFirstBranchDropdownItem = () => findBranchDropdownItems().at(0); const findFirstBranchDropdownItem = () => findBranchDropdownItems().at(0);
const findTagsSection = () => wrapper.find('[data-testid="tags-section"]'); const findTagsSection = () => wrapper.find('[data-testid="tags-section"]');
const findTagDropdownItems = () => findTagsSection().findAll(GlNewDropdownItem); const findTagDropdownItems = () => findTagsSection().findAll(GlDropdownItem);
const findFirstTagDropdownItem = () => findTagDropdownItems().at(0); const findFirstTagDropdownItem = () => findTagDropdownItems().at(0);
const findCommitsSection = () => wrapper.find('[data-testid="commits-section"]'); const findCommitsSection = () => wrapper.find('[data-testid="commits-section"]');
const findCommitDropdownItems = () => findCommitsSection().findAll(GlNewDropdownItem); const findCommitDropdownItems = () => findCommitsSection().findAll(GlDropdownItem);
const findFirstCommitDropdownItem = () => findCommitDropdownItems().at(0); const findFirstCommitDropdownItem = () => findCommitDropdownItems().at(0);
// //
......
import { shallowMount, mount } from '@vue/test-utils'; import { shallowMount, mount } from '@vue/test-utils';
import { import { GlFilteredSearch, GlButtonGroup, GlButton, GlDropdown, GlDropdownItem } from '@gitlab/ui';
GlFilteredSearch,
GlButtonGroup,
GlButton,
GlDropdown,
GlNewDropdownItem as GlDropdownItem,
} from '@gitlab/ui';
import FilteredSearchBarRoot from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; import FilteredSearchBarRoot from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue';
import { uniqueTokens } from '~/vue_shared/components/filtered_search_bar/filtered_search_utils'; import { uniqueTokens } from '~/vue_shared/components/filtered_search_bar/filtered_search_utils';
......
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