Commit e3002fbf authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch 'migrate-gl-new-dropdown' into 'master'

Migrate GlNewDropdownText and GlNewDropdown

See merge request gitlab-org/gitlab!42146
parents 2ccc00ee 00623dfe
<script>
import { GlNewDropdown, GlNewDropdownItem, GlSprintf } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem, GlSprintf } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import allVersionsMixin from '../../mixins/all_versions';
import { findVersionId } from '../../utils/design_management_utils';
export default {
components: {
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlSprintf,
},
......@@ -63,7 +63,7 @@ export default {
</script>
<template>
<gl-new-dropdown :text="dropdownText" size="small">
<gl-dropdown :text="dropdownText" size="small">
<gl-new-dropdown-item
v-for="(version, index) in allVersions"
:key="version.id"
......@@ -77,5 +77,5 @@ export default {
</template>
</gl-sprintf>
</gl-new-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
</template>
......@@ -6,7 +6,7 @@ import {
GlIcon,
GlFormGroup,
GlFormCheckbox,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
} from '@gitlab/ui';
import {
......@@ -24,7 +24,7 @@ export default {
GlFormGroup,
GlIcon,
GlFormCheckbox,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
},
inject: ['service', 'alertSettings'],
......@@ -101,7 +101,7 @@ export default {
<gl-icon name="question" :size="12" />
</gl-link>
</label>
<gl-new-dropdown
<gl-dropdown
id="alert-integration-settings-issue-template"
data-qa-selector="incident_templates_dropdown"
:text="issueTemplateHeader"
......@@ -117,7 +117,7 @@ export default {
>
{{ template.name }}
</gl-new-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
</gl-form-group>
<gl-form-group class="gl-pl-0 gl-mb-5">
......
<script>
import { mapState } from 'vuex';
import { GlNewDropdown, GlNewDropdownItem, GlLink } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem, GlLink } from '@gitlab/ui';
import { s__ } from '~/locale';
import { defaultIntegrationLevel, overrideDropdownDescriptions } from '../constants';
......@@ -19,7 +19,7 @@ export default {
dropdownOptions,
name: 'OverrideDropdown',
components: {
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlLink,
},
......@@ -73,7 +73,7 @@ export default {
}}</gl-link>
</span>
<input name="service[inherit_from_id]" :value="override ? '' : inheritFromId" type="hidden" />
<gl-new-dropdown :text="selected.text">
<gl-dropdown :text="selected.text">
<gl-new-dropdown-item
v-for="option in $options.dropdownOptions"
:key="option.value"
......@@ -81,6 +81,6 @@ export default {
>
{{ option.text }}
</gl-new-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
</div>
</template>
......@@ -2,9 +2,9 @@
import {
GlAlert,
GlButton,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlNewDropdownText,
GlDropdownText,
GlFormGroup,
GlFormSelect,
GlIcon,
......@@ -34,9 +34,9 @@ export default {
components: {
GlAlert,
GlButton,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlNewDropdownText,
GlDropdownText,
GlFormGroup,
GlFormSelect,
GlIcon,
......@@ -293,7 +293,7 @@ export default {
<gl-icon name="arrow-right" :aria-label="__('Will be mapped to')" />
</template>
<template #cell(gitlabUsername)="data">
<gl-new-dropdown
<gl-dropdown
:text="data.value || $options.currentUsername"
class="w-100"
:aria-label="
......@@ -314,10 +314,10 @@ export default {
{{ user.username }} ({{ user.name }})
</gl-new-dropdown-item>
<gl-new-dropdown-text v-show="shouldShowNoMatchesFoundText" class="text-secondary">
<gl-dropdown-text v-show="shouldShowNoMatchesFoundText" class="text-secondary">
{{ __('No matches found') }}
</gl-new-dropdown-text>
</gl-new-dropdown>
</gl-dropdown-text>
</gl-dropdown>
</template>
</gl-table>
......
<script>
import {
GlNewDropdown,
GlDropdown,
GlNewDropdownDivider,
GlNewDropdownHeader,
GlNewDropdownItem,
......@@ -17,7 +17,7 @@ const SEARCH_DEBOUNCE_MS = 250;
export default {
components: {
GlNewDropdown,
GlDropdown,
GlNewDropdownDivider,
GlNewDropdownHeader,
GlNewDropdownItem,
......@@ -188,7 +188,7 @@ export default {
</script>
<template>
<gl-new-dropdown v-bind="$attrs" class="project-milestone-combobox" @shown="focusSearchBox">
<gl-dropdown v-bind="$attrs" class="project-milestone-combobox" @shown="focusSearchBox">
<template slot="button-content">
<span ref="buttonText" class="flex-grow-1 ml-1 text-muted">{{
selectedMilestonesLabel
......@@ -246,5 +246,5 @@ export default {
<gl-new-dropdown-item v-for="(item, idx) in extraLinks" :key="idx" :href="item.url">
<span class="pl-4">{{ item.text }}</span>
</gl-new-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
</template>
......@@ -7,7 +7,7 @@ import {
GlButtonGroup,
GlFormGroup,
GlFormInput,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownItem as GlDropdownItem,
GlModal,
GlTooltipDirective,
......
......@@ -2,7 +2,7 @@
import { mapState, mapGetters, mapActions } from 'vuex';
import {
GlDeprecatedButton,
GlNewDropdown,
GlDropdown,
GlNewDropdownDivider,
GlNewDropdownItem,
GlModal,
......@@ -23,7 +23,7 @@ import { getAddMetricTrackingOptions } from '../utils';
export default {
components: {
GlDeprecatedButton,
GlNewDropdown,
GlDropdown,
GlNewDropdownDivider,
GlNewDropdownItem,
GlModal,
......@@ -143,7 +143,7 @@ export default {
as part of https://gitlab.com/gitlab-org/gitlab-ui/-/issues/936
The variant will create a dropdown with an icon, no text and no caret
-->
<gl-new-dropdown
<gl-dropdown
v-gl-tooltip
data-testid="actions-menu"
data-qa-selector="actions_menu_dropdown"
......@@ -287,5 +287,5 @@ export default {
:project-path="projectPath"
/>
</template>
</gl-new-dropdown>
</gl-dropdown>
</template>
......@@ -3,7 +3,7 @@ import { debounce } from 'lodash';
import { mapActions, mapState, mapGetters } from 'vuex';
import {
GlButton,
GlNewDropdown,
GlDropdown,
GlLoadingIcon,
GlNewDropdownItem,
GlNewDropdownHeader,
......@@ -28,7 +28,7 @@ export default {
components: {
GlIcon,
GlButton,
GlNewDropdown,
GlDropdown,
GlLoadingIcon,
GlNewDropdownItem,
GlNewDropdownHeader,
......@@ -181,7 +181,7 @@ export default {
<span aria-hidden="true" class="gl-pl-3 border-left gl-mb-3 d-none d-sm-block"></span>
<div class="mb-2 pr-2 d-flex d-sm-block">
<gl-new-dropdown
<gl-dropdown
id="monitor-environments-dropdown"
ref="monitorEnvironmentsDropdown"
class="flex-grow-1"
......@@ -214,7 +214,7 @@ export default {
{{ __('No matching results') }}
</div>
</div>
</gl-new-dropdown>
</gl-dropdown>
</div>
<div class="mb-2 pr-2 d-flex d-sm-block">
......
......@@ -6,7 +6,7 @@ import {
GlIcon,
GlLink,
GlLoadingIcon,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownItem as GlDropdownItem,
GlNewDropdownDivider as GlDropdownDivider,
GlModal,
......
......@@ -2,7 +2,7 @@
import { mapState, mapGetters } from 'vuex';
import {
GlIcon,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlNewDropdownHeader,
GlNewDropdownDivider,
......@@ -17,7 +17,7 @@ const events = {
export default {
components: {
GlIcon,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlNewDropdownHeader,
GlNewDropdownDivider,
......@@ -73,7 +73,7 @@ export default {
};
</script>
<template>
<gl-new-dropdown
<gl-dropdown
toggle-class="dropdown-menu-toggle"
menu-class="monitor-dashboard-dropdown-menu"
:text="selectedDashboardText"
......@@ -127,5 +127,5 @@ export default {
{{ __('No matching results') }}
</div>
</div>
</gl-new-dropdown>
</gl-dropdown>
</template>
......@@ -4,7 +4,7 @@ import { mapActions } from 'vuex';
import {
GlButtonGroup,
GlButton,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlNewDropdownDivider,
GlTooltipDirective,
......@@ -48,7 +48,7 @@ export default {
components: {
GlButtonGroup,
GlButton,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlNewDropdownDivider,
},
......@@ -152,7 +152,7 @@ export default {
icon="retry"
@click="refresh"
/>
<gl-new-dropdown
<gl-dropdown
v-if="!disableMetricDashboardRefreshRate"
v-gl-tooltip
:title="s__('Metrics|Set refresh rate')"
......@@ -173,6 +173,6 @@ export default {
@click="setRefreshInterval(option)"
>{{ option.label }}</gl-new-dropdown-item
>
</gl-new-dropdown>
</gl-dropdown>
</gl-button-group>
</template>
......@@ -9,7 +9,7 @@ import {
GlFormInput,
GlFormSelect,
GlLink,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlSearchBoxByType,
GlSprintf,
......@@ -37,7 +37,7 @@ export default {
GlFormInput,
GlFormSelect,
GlLink,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlSearchBoxByType,
GlSprintf,
......@@ -173,7 +173,7 @@ export default {
>{{ error }}</gl-alert
>
<gl-form-group :label="s__('Pipeline|Run for')">
<gl-new-dropdown :text="refValue" block>
<gl-dropdown :text="refValue" block>
<gl-search-box-by-type
v-model.trim="searchTerm"
:placeholder="__('Search branches and tags')"
......@@ -189,7 +189,7 @@ export default {
>
{{ ref }}
</gl-new-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
<template #description>
<div>
......
......@@ -2,7 +2,7 @@
import { debounce } from 'lodash';
import { mapState, mapActions } from 'vuex';
import {
GlNewDropdown,
GlDropdown,
GlNewDropdownHeader,
GlNewDropdownItem,
GlSearchBoxByType,
......@@ -18,7 +18,7 @@ const tooltipMessage = __('Searching by both author and message is currently not
export default {
name: 'AuthorSelect',
components: {
GlNewDropdown,
GlDropdown,
GlNewDropdownHeader,
GlNewDropdownItem,
GlSearchBoxByType,
......@@ -107,7 +107,7 @@ export default {
<template>
<div ref="dropdownContainer" v-gl-tooltip :title="tooltipTitle" :disabled="!hasSearchParam">
<gl-new-dropdown
<gl-dropdown
:text="dropdownText"
:disabled="hasSearchParam"
toggle-class="gl-py-3 gl-border-0"
......@@ -137,6 +137,6 @@ export default {
>
{{ author.name }}
</gl-new-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
</div>
</template>
<script>
import { mapActions, mapGetters, mapState } from 'vuex';
import {
GlNewDropdown,
GlDropdown,
GlNewDropdownDivider,
GlNewDropdownHeader,
GlSearchBoxByType,
......@@ -18,7 +18,7 @@ export default {
name: 'RefSelector',
store: createStore(),
components: {
GlNewDropdown,
GlDropdown,
GlNewDropdownDivider,
GlNewDropdownHeader,
GlSearchBoxByType,
......@@ -120,7 +120,7 @@ export default {
</script>
<template>
<gl-new-dropdown v-bind="$attrs" class="ref-selector" @shown="focusSearchBox">
<gl-dropdown v-bind="$attrs" class="ref-selector" @shown="focusSearchBox">
<template slot="button-content">
<span class="gl-flex-grow-1 gl-ml-2 gl-text-gray-400" data-testid="button-content">
<span v-if="selectedRef" class="gl-font-monospace">{{ selectedRef }}</span>
......@@ -208,5 +208,5 @@ export default {
</template>
</div>
</div>
</gl-new-dropdown>
</gl-dropdown>
</template>
......@@ -4,7 +4,7 @@ import Mousetrap from 'mousetrap';
import { escape } from 'lodash';
import {
GlButton,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownHeader as GlDropdownHeader,
GlNewDropdownItem as GlDropdownItem,
GlTooltipDirective,
......
<script>
import {
GlNewDropdown,
GlDropdown,
GlNewDropdownHeader,
GlFormInputGroup,
GlButton,
......@@ -11,7 +11,7 @@ import { getHTTPProtocol } from '~/lib/utils/url_utility';
export default {
components: {
GlNewDropdown,
GlDropdown,
GlNewDropdownHeader,
GlFormInputGroup,
GlButton,
......@@ -45,7 +45,7 @@ export default {
};
</script>
<template>
<gl-new-dropdown right :text="$options.labels.defaultLabel" category="primary" variant="info">
<gl-dropdown right :text="$options.labels.defaultLabel" category="primary" variant="info">
<div class="pb-2 mx-1">
<template v-if="sshLink">
<gl-new-dropdown-header>{{ $options.labels.ssh }}</gl-new-dropdown-header>
......@@ -85,5 +85,5 @@ export default {
</div>
</template>
</div>
</gl-new-dropdown>
</gl-dropdown>
</template>
......@@ -3,7 +3,7 @@ import {
GlFilteredSearch,
GlButtonGroup,
GlButton,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownItem as GlDropdownItem,
GlTooltipDirective,
} from '@gitlab/ui';
......
<script>
import { GlNewDropdown, GlDeprecatedDropdownItem, GlSearchBoxByType, GlIcon } from '@gitlab/ui';
import { GlDropdown, GlDeprecatedDropdownItem, GlSearchBoxByType, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
import autofocusonshow from '~/vue_shared/directives/autofocusonshow';
export default {
name: 'TimezoneDropdown',
components: {
GlNewDropdown,
GlDropdown,
GlDeprecatedDropdownItem,
GlSearchBoxByType,
GlIcon,
......@@ -74,7 +74,7 @@ export default {
};
</script>
<template>
<gl-new-dropdown :text="value" block lazy menu-class="gl-w-full!">
<gl-dropdown :text="value" block lazy menu-class="gl-w-full!">
<template #button-content>
<span class="gl-flex-grow-1" :class="{ 'gl-text-gray-300': !value }">
{{ selectedTimezoneLabel }}
......@@ -98,5 +98,5 @@ export default {
<gl-deprecated-dropdown-item v-if="!filteredResults.length" data-testid="noMatchingResults">
{{ $options.tranlations.noResultsText }}
</gl-deprecated-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
</template>
<script>
import {
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownHeader as GlDropdownHeader,
GlNewDropdownItem as GlDropdownItem,
} from '@gitlab/ui';
......
......@@ -2,7 +2,7 @@
import {
GlAlert,
GlButton,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownItem as GlDropdownItem,
GlNewDropdownDivider as GlDropdownDivider,
GlForm,
......
......@@ -4,7 +4,7 @@ import {
GlIcon,
GlLoadingIcon,
GlAvatar,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownHeader as GlDropdownHeader,
GlNewDropdownItem as GlDropdownItem,
GlSearchBoxByType,
......
......@@ -4,7 +4,7 @@ import {
GlIcon,
GlLoadingIcon,
GlAvatar,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownHeader as GlDropdownHeader,
GlNewDropdownItem as GlDropdownItem,
GlSearchBoxByType,
......
<script>
import { GlNewDropdown, GlNewDropdownHeader, GlNewDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownHeader, GlNewDropdownItem } from '@gitlab/ui';
import { s__ } from '~/locale';
const SORTING_TITLE = s__('SortOptions|Sort by:');
......@@ -16,7 +16,7 @@ const SORTING_OPTIONS = [
export default {
components: {
GlNewDropdown,
GlDropdown,
GlNewDropdownHeader,
GlNewDropdownItem,
},
......@@ -47,7 +47,7 @@ export default {
<template>
<div>
<gl-new-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-item
v-for="option in $options.SORTING_OPTIONS"
......@@ -58,6 +58,6 @@ export default {
>
{{ option.text }}
</gl-new-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import { GlNewDropdown as GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { __ } from '~/locale';
export default {
......
<script>
import { debounce } from 'lodash';
import {
GlNewDropdown,
GlDropdown,
GlNewDropdownDivider,
GlNewDropdownItem,
GlIcon,
......@@ -14,7 +14,7 @@ import { deprecatedCreateFlash as createFlash } from '~/flash';
export default {
components: {
GlNewDropdown,
GlDropdown,
GlNewDropdownDivider,
GlNewDropdownItem,
GlSearchBoxByType,
......@@ -70,7 +70,7 @@ export default {
};
</script>
<template>
<gl-new-dropdown class="js-new-environments-dropdown" @shown="setFocus">
<gl-dropdown class="js-new-environments-dropdown" @shown="setFocus">
<template #button-content>
<span class="d-md-none mr-1">
{{ $options.translations.addEnvironmentsLabel }}
......@@ -102,5 +102,5 @@ export default {
{{ createEnvironmentLabel }}
</gl-new-dropdown-item>
</template>
</gl-new-dropdown>
</gl-dropdown>
</template>
......@@ -6,7 +6,7 @@ import {
GlLoadingIcon,
GlEmptyState,
GlIcon,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
} from '@gitlab/ui';
import { formatDate } from '~/lib/utils/datetime_utility';
......@@ -35,7 +35,7 @@ export default {
GlLoadingIcon,
GlEmptyState,
GlIcon,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
IterationForm,
IterationReportSummary,
......@@ -193,7 +193,7 @@ export default {
<span class="gl-ml-4"
>{{ formatDate(iteration.startDate) }}{{ formatDate(iteration.dueDate) }}</span
>
<gl-new-dropdown
<gl-dropdown
v-if="canEditIteration"
data-testid="actions-dropdown"
variant="default"
......@@ -208,7 +208,7 @@ export default {
<gl-new-dropdown-item @click="loadEditPage">{{
__('Edit iteration')
}}</gl-new-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
</div>
<h3 ref="title" class="page-title">{{ iteration.title }}</h3>
<div ref="description" v-html="iteration.descriptionHtml"></div>
......
......@@ -8,7 +8,7 @@ import {
GlFormGroup,
GlIcon,
GlLink,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownItem as GlDropdownItem,
GlSkeletonLoader,
GlSprintf,
......
<script>
import { GlNewDropdown, GlNewDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem } from '@gitlab/ui';
export default {
components: {
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
},
props: {
......@@ -34,7 +34,7 @@ export default {
<template>
<div>
<input type="hidden" name="group[visibility_level]" :value="selectedOption.level" />
<gl-new-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
v-for="option in visibilityLevelOptions"
:key="option.level"
......@@ -43,6 +43,6 @@ export default {
>
<div class="gl-font-weight-bold gl-mb-1">{{ option.label }}</div>
</gl-new-dropdown-item>
</gl-new-dropdown>
</gl-dropdown>
</div>
</template>
......@@ -3,7 +3,7 @@ import { mapState, mapActions } from 'vuex';
import {
GlFormGroup,
GlSegmentedControl,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownItem as GlDropdownItem,
GlNewDropdownDivider as GlDropdownDivider,
} from '@gitlab/ui';
......
<script>
import { GlButton, GlNewDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui';
import { GlButton, GlDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui';
import { s__ } from '~/locale';
export default {
......@@ -8,7 +8,7 @@ export default {
},
components: {
GlButton,
GlNewDropdown,
GlDropdown,
GlDeprecatedDropdownItem,
},
props: {
......@@ -39,7 +39,7 @@ export default {
<template>
<div>
<strong>{{ s__('SecurityReports|Download Report') }}</strong>
<gl-new-dropdown
<gl-dropdown
v-if="hasDropdown"
class="d-block mt-1"
:text="$options.i18n.FUZZING_ARTIFACTS"
......@@ -53,7 +53,7 @@ export default {
:href="artifactDownloadUrl(job)"
>{{ job.name }}</gl-deprecated-dropdown-item
>
</gl-new-dropdown>
</gl-dropdown>
<gl-button
v-else
class="d-block mt-1"
......
......@@ -2,7 +2,7 @@
import {
GlButton,
GlLink,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlSearchBoxByType,
GlNewDropdownHeader,
......@@ -24,7 +24,7 @@ export default {
components: {
GlButton,
GlLink,
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlSearchBoxByType,
GlNewDropdownHeader,
......@@ -187,7 +187,7 @@ export default {
><strong>{{ iterationTitle }}</strong></gl-link
>
</div>
<gl-new-dropdown
<gl-dropdown
v-show="editing"
ref="newDropdown"
data-toggle="dropdown"
......@@ -207,6 +207,6 @@ export default {
@click="setIteration(iterationItem.id)"
>{{ iterationItem.title }}</gl-new-dropdown-item
>
</gl-new-dropdown>
</gl-dropdown>
</div>
</template>
<script>
import { GlNewDropdown as GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { sprintf, s__ } from '~/locale';
import { EntityTypes } from './constants';
......
import { shallowMount } from '@vue/test-utils';
import { GlNewDropdown as GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import StageDropdownFilter from 'ee/analytics/cycle_analytics/components/stage_dropdown_filter.vue';
const stages = [
......
import Vuex from 'vuex';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { GlButton, GlNewDropdown as GlDropdown, GlFormGroup } from '@gitlab/ui';
import { GlButton, GlDropdown, GlFormGroup } from '@gitlab/ui';
import ValueStreamSelect from 'ee/analytics/cycle_analytics/components/value_stream_select.vue';
import { valueStreams } from '../mock_data';
import { findDropdownItemText } from '../helpers';
......
import { mount } from '@vue/test-utils';
import { GlNewDropdown as GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import GroupsDropdownFilter from 'ee/analytics/shared/components/groups_dropdown_filter.vue';
import { TEST_HOST } from 'helpers/test_constants';
import Api from '~/api';
......
import { mount } from '@vue/test-utils';
import ProjectsDropdownFilter from 'ee/analytics/shared/components/projects_dropdown_filter.vue';
import { GlNewDropdown as GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { LAST_ACTIVITY_AT } from 'ee/analytics/shared/constants';
import { TEST_HOST } from 'helpers/test_constants';
import Api from '~/api';
......
import Vue from 'vue';
import Vuex from 'vuex';
import { mount } from '@vue/test-utils';
import { GlNewDropdown as GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import ToggleEpicsSwimlanes from 'ee/boards/components/toggle_epics_swimlanes.vue';
Vue.use(Vuex);
......
import { shallowMount } from '@vue/test-utils';
import {
GlNewDropdown,
GlDropdown,
GlNewDropdownItem,
GlEmptyState,
GlLoadingIcon,
......@@ -229,7 +229,7 @@ describe('Iterations report', () => {
});
it(`${canEditIteration ? 'is shown' : 'is hidden'}`, () => {
expect(wrapper.find(GlNewDropdown).exists()).toBe(canEditIteration);
expect(wrapper.find(GlDropdown).exists()).toBe(canEditIteration);
});
},
);
......
import { shallowMount } from '@vue/test-utils';
import { GlNewDropdown, GlNewDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem } from '@gitlab/ui';
import Component from 'ee/registrations/components/visibility_level_dropdown.vue';
describe('Visibility Level Dropdown', () => {
......@@ -31,7 +31,7 @@ describe('Visibility Level Dropdown', () => {
const hiddenInputValue = () =>
wrapper.find("input[name='group[visibility_level]']").attributes('value');
const dropdownText = () => wrapper.find(GlNewDropdown).props('text');
const dropdownText = () => wrapper.find(GlDropdown).props('text');
const findDropdownItems = () =>
wrapper.findAll(GlNewDropdownItem).wrappers.map(option => ({
text: option.text(),
......
import Vuex from 'vuex';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import {
GlSegmentedControl,
GlNewDropdown as GlDropdown,
GlNewDropdownItem as GlDropdownItem,
} from '@gitlab/ui';
import { GlSegmentedControl, GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import RoadmapFilters from 'ee/roadmap/components/roadmap_filters.vue';
import createStore from 'ee/roadmap/store';
......
......@@ -2,7 +2,7 @@ import Vuex from 'vuex';
import FuzzingArtifactsDownload from 'ee/security_dashboard/components/fuzzing_artifacts_download.vue';
import createStore from 'ee/security_dashboard/store';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { GlButton, GlNewDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui';
import { GlButton, GlDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui';
const localVue = createLocalVue();
localVue.use(Vuex);
......@@ -41,7 +41,7 @@ describe('Filter component', () => {
it('should render a download button', () => {
expect(wrapper.find(GlButton).exists()).toBe(true);
expect(wrapper.find(GlNewDropdown).exists()).toBe(false);
expect(wrapper.find(GlDropdown).exists()).toBe(false);
});
it('should render with href set to the correct filepath', () => {
......@@ -59,7 +59,7 @@ describe('Filter component', () => {
it('should render a dropdown button with several items', () => {
expect(wrapper.find(GlButton).exists()).toBe(false);
expect(wrapper.find(GlNewDropdown).exists()).toBe(true);
expect(wrapper.find(GlDropdown).exists()).toBe(true);
expect(wrapper.findAll(GlDeprecatedDropdownItem).length).toBe(2);
});
......
import { shallowMount } from '@vue/test-utils';
import { GlNewDropdown, GlNewDropdownItem, GlButton, GlLink, GlSearchBoxByType } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem, GlButton, GlLink, GlSearchBoxByType } from '@gitlab/ui';
import IterationSelect from 'ee/sidebar/components/iteration_select.vue';
import { iterationSelectTextMap } from 'ee/sidebar/constants';
import setIterationOnIssue from 'ee/sidebar/queries/set_iteration_on_issue.mutation.graphql';
......@@ -88,12 +88,12 @@ describe('IterationSelect', () => {
it('opens the dropdown on click of the edit button', () => {
createComponent({ props: { canEdit: true } });
expect(wrapper.find(GlNewDropdown).isVisible()).toBe(false);
expect(wrapper.find(GlDropdown).isVisible()).toBe(false);
toggleDropdown();
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlNewDropdown).isVisible()).toBe(true);
expect(wrapper.find(GlDropdown).isVisible()).toBe(true);
});
});
......@@ -113,7 +113,7 @@ describe('IterationSelect', () => {
const spy = jest.fn();
createComponent({ props: { canEdit: true } });
expect(wrapper.find(GlNewDropdown).isVisible()).toBe(false);
expect(wrapper.find(GlDropdown).isVisible()).toBe(false);
toggleDropdown(spy);
......@@ -127,7 +127,7 @@ describe('IterationSelect', () => {
it('shows GlNewDropdown', () => {
createComponent({ props: { canEdit: true }, data: { editing: true } });
expect(wrapper.find(GlNewDropdown).isVisible()).toBe(true);
expect(wrapper.find(GlDropdown).isVisible()).toBe(true);
});
describe('GlDropdownItem with the right title and id', () => {
......@@ -283,12 +283,12 @@ describe('IterationSelect', () => {
});
it('closes the dropdown', () => {
expect(wrapper.find(GlNewDropdown).isVisible()).toBe(true);
expect(wrapper.find(GlDropdown).isVisible()).toBe(true);
toggleDropdown();
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlNewDropdown).isVisible()).toBe(false);
expect(wrapper.find(GlDropdown).isVisible()).toBe(false);
});
});
});
......
import { shallowMount } from '@vue/test-utils';
import PolicyRuleEntity from 'ee/threat_monitoring/components/policy_editor/policy_rule_entity.vue';
import { GlNewDropdown as GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem as GlDropdownItem } from '@gitlab/ui';
import { EntityTypes } from 'ee/threat_monitoring/components/policy_editor/constants';
describe('PolicyRuleEntity component', () => {
......
import Vuex from 'vuex';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { GlDeprecatedDropdownItem, GlNewDropdown } from '@gitlab/ui';
import { GlDeprecatedDropdownItem, GlDropdown } from '@gitlab/ui';
import TimezoneDropdown from '~/vue_shared/components/timezone_dropdown.vue';
import createStore from '~/deploy_freeze/store';
......@@ -92,7 +92,7 @@ describe('Deploy freeze timezone dropdown', () => {
});
it('renders selected time zone as dropdown label', () => {
expect(wrapper.find(GlNewDropdown).vm.text).toBe('Alaska');
expect(wrapper.find(GlDropdown).vm.text).toBe('Alaska');
});
});
});
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Design management design version dropdown component renders design version dropdown button 1`] = `
<gl-new-dropdown-stub
<gl-dropdown-stub
category="tertiary"
headertext=""
issueiid=""
......@@ -35,11 +35,11 @@ exports[`Design management design version dropdown component renders design vers
1
</gl-new-dropdown-item-stub>
</gl-new-dropdown-stub>
</gl-dropdown-stub>
`;
exports[`Design management design version dropdown component renders design version list 1`] = `
<gl-new-dropdown-stub
<gl-dropdown-stub
category="tertiary"
headertext=""
issueiid=""
......@@ -73,5 +73,5 @@ exports[`Design management design version dropdown component renders design vers
1
</gl-new-dropdown-item-stub>
</gl-new-dropdown-stub>
</gl-dropdown-stub>
`;
import { shallowMount } from '@vue/test-utils';
import { GlNewDropdown, GlNewDropdownItem, GlSprintf } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem, GlSprintf } from '@gitlab/ui';
import DesignVersionDropdown from '~/design_management/components/upload/design_version_dropdown.vue';
import mockAllVersions from './mock_data/all_versions';
......@@ -75,7 +75,7 @@ describe('Design management design version dropdown component', () => {
createComponent();
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlNewDropdown).attributes('text')).toBe('Showing latest version');
expect(wrapper.find(GlDropdown).attributes('text')).toBe('Showing latest version');
});
});
......@@ -83,7 +83,7 @@ describe('Design management design version dropdown component', () => {
createComponent({ maxVersions: 1 });
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlNewDropdown).attributes('text')).toBe('Showing latest version');
expect(wrapper.find(GlDropdown).attributes('text')).toBe('Showing latest version');
});
});
......@@ -91,7 +91,7 @@ describe('Design management design version dropdown component', () => {
createComponent({ $route: designRouteFactory(PREVIOUS_VERSION_ID) });
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlNewDropdown).attributes('text')).toBe(`Showing version #1`);
expect(wrapper.find(GlDropdown).attributes('text')).toBe(`Showing version #1`);
});
});
......@@ -99,7 +99,7 @@ describe('Design management design version dropdown component', () => {
createComponent({ $route: designRouteFactory(LATEST_VERSION_ID) });
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlNewDropdown).attributes('text')).toBe('Showing latest version');
expect(wrapper.find(GlDropdown).attributes('text')).toBe('Showing latest version');
});
});
......
......@@ -45,7 +45,7 @@ exports[`Alert integration settings form default state should match the default
</gl-link-stub>
</label>
<gl-new-dropdown-stub
<gl-dropdown-stub
block="true"
category="tertiary"
data-qa-selector="incident_templates_dropdown"
......@@ -68,7 +68,7 @@ exports[`Alert integration settings form default state should match the default
No template selected
</gl-new-dropdown-item-stub>
</gl-new-dropdown-stub>
</gl-dropdown-stub>
</gl-form-group-stub>
<gl-form-group-stub
......
import { shallowMount } from '@vue/test-utils';
import { GlNewDropdown, GlLink } from '@gitlab/ui';
import { GlDropdown, GlLink } from '@gitlab/ui';
import { createStore } from '~/integrations/edit/store';
import { integrationLevels, overrideDropdownDescriptions } from '~/integrations/edit/constants';
......@@ -34,14 +34,14 @@ describe('OverrideDropdown', () => {
});
const findGlLink = () => wrapper.find(GlLink);
const findGlNewDropdown = () => wrapper.find(GlNewDropdown);
const findGlDropdown = () => wrapper.find(GlDropdown);
describe('template', () => {
describe('override prop is true', () => {
it('renders GlToggle as disabled', () => {
createComponent();
expect(findGlNewDropdown().props('text')).toBe('Use custom settings');
expect(findGlDropdown().props('text')).toBe('Use custom settings');
});
});
......@@ -49,7 +49,7 @@ describe('OverrideDropdown', () => {
it('renders GlToggle as disabled', () => {
createComponent({ override: false });
expect(findGlNewDropdown().props('text')).toBe('Use default settings');
expect(findGlDropdown().props('text')).toBe('Use default settings');
});
});
......
import { GlAlert, GlButton, GlNewDropdown, GlFormSelect, GlLabel, GlTable } from '@gitlab/ui';
import { GlAlert, GlButton, GlDropdown, GlFormSelect, GlLabel, GlTable } from '@gitlab/ui';
import { getByRole } from '@testing-library/dom';
import { mount, shallowMount } from '@vue/test-utils';
import AxiosMockAdapter from 'axios-mock-adapter';
......@@ -35,7 +35,7 @@ describe('JiraImportForm', () => {
const getTable = () => wrapper.find(GlTable);
const getUserDropdown = () => getTable().find(GlNewDropdown);
const getUserDropdown = () => getTable().find(GlDropdown);
const getHeader = name => getByRole(wrapper.element, 'columnheader', { name });
......
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import { shallowMount } from '@vue/test-utils';
import { GlNewDropdown, GlLoadingIcon, GlSearchBoxByType } from '@gitlab/ui';
import { GlDropdown, GlLoadingIcon, GlSearchBoxByType } from '@gitlab/ui';
import { ENTER_KEY } from '~/lib/utils/keys';
import MilestoneCombobox from '~/milestones/project_milestone_combobox.vue';
import { milestones as projectMilestones } from './mock_data';
......@@ -53,7 +53,7 @@ describe('Milestone selector', () => {
});
it('renders the dropdown', () => {
expect(wrapper.find(GlNewDropdown)).toExist();
expect(wrapper.find(GlDropdown)).toExist();
});
it('renders additional links', () => {
......
......@@ -32,7 +32,7 @@ exports[`Dashboard template matches the default snapshot 1`] = `
<div
class="mb-2 pr-2 d-flex d-sm-block"
>
<gl-new-dropdown-stub
<gl-dropdown-stub
category="tertiary"
class="flex-grow-1"
data-qa-selector="environments_dropdown"
......@@ -69,7 +69,7 @@ exports[`Dashboard template matches the default snapshot 1`] = `
</div>
</div>
</gl-new-dropdown-stub>
</gl-dropdown-stub>
</div>
<div
......
import { shallowMount } from '@vue/test-utils';
import Visibility from 'visibilityjs';
import { GlNewDropdown, GlNewDropdownItem, GlButton } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem, GlButton } from '@gitlab/ui';
import { createStore } from '~/monitoring/stores';
import RefreshButton from '~/monitoring/components/refresh_button.vue';
......@@ -15,7 +15,7 @@ describe('RefreshButton', () => {
};
const findRefreshBtn = () => wrapper.find(GlButton);
const findDropdown = () => wrapper.find(GlNewDropdown);
const findDropdown = () => wrapper.find(GlDropdown);
const findOptions = () => findDropdown().findAll(GlNewDropdownItem);
const findOptionAt = index => findOptions().at(index);
......
import { mount, shallowMount } from '@vue/test-utils';
import { GlNewDropdown, GlNewDropdownItem, GlForm } from '@gitlab/ui';
import { GlDropdown, GlNewDropdownItem, GlForm } from '@gitlab/ui';
import MockAdapter from 'axios-mock-adapter';
import waitForPromises from 'helpers/wait_for_promises';
import axios from '~/lib/utils/axios_utils';
......@@ -23,7 +23,7 @@ describe('Pipeline New Form', () => {
};
const findForm = () => wrapper.find(GlForm);
const findDropdown = () => wrapper.find(GlNewDropdown);
const findDropdown = () => wrapper.find(GlDropdown);
const findDropdownItems = () => wrapper.findAll(GlNewDropdownItem);
const findVariableRows = () => wrapper.findAll('[data-testid="ci-variable-row"]');
const findRemoveIcons = () => wrapper.findAll('[data-testid="remove-ci-variable-row"]');
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import {
GlNewDropdown,
GlNewDropdownHeader,
GlSearchBoxByType,
GlNewDropdownItem,
} from '@gitlab/ui';
import { GlDropdown, GlNewDropdownHeader, GlSearchBoxByType, GlNewDropdownItem } from '@gitlab/ui';
import * as urlUtility from '~/lib/utils/url_utility';
import AuthorSelect from '~/projects/commits/components/author_select.vue';
import { createStore } from '~/projects/commits/store';
......@@ -63,7 +58,7 @@ describe('Author Select', () => {
});
const findDropdownContainer = () => wrapper.find({ ref: 'dropdownContainer' });
const findDropdown = () => wrapper.find(GlNewDropdown);
const findDropdown = () => wrapper.find(GlDropdown);
const findDropdownHeader = () => wrapper.find(GlNewDropdownHeader);
const findSearchBox = () => wrapper.find(GlSearchBoxByType);
const findDropdownItems = () => wrapper.findAll(GlNewDropdownItem);
......
......@@ -177,7 +177,7 @@ describe('Ref selector component', () => {
return waitForRequests();
});
it('adds the provided ID to the GlNewDropdown instance', () => {
it('adds the provided ID to the GlDropdown instance', () => {
expect(wrapper.attributes().id).toBe(id);
});
});
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Clone Dropdown Button rendering matches the snapshot 1`] = `
<gl-new-dropdown-stub
<gl-dropdown-stub
category="primary"
headertext=""
right=""
......@@ -94,5 +94,5 @@ exports[`Clone Dropdown Button rendering matches the snapshot 1`] = `
</div>
</div>
</div>
</gl-new-dropdown-stub>
</gl-dropdown-stub>
`;
......@@ -3,7 +3,7 @@ import {
GlFilteredSearch,
GlButtonGroup,
GlButton,
GlNewDropdown as GlDropdown,
GlDropdown,
GlNewDropdownItem as GlDropdownItem,
} from '@gitlab/ui';
......
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