Commit d5aed4a4 authored by Mark Florian's avatar Mark Florian

Upgrade to @gitlab/ui@16.0

Part of the [Style text badges issue][1].

This moves most uses of `GlBadge` to `GlDeprecatedBadge`. Some have been
moved to the new `GlBadge`, as they've received UX review.

[1]: https://gitlab.com/gitlab-org/gitlab-ui/-/issues/481
parent 548b5299
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
GlDropdownItem, GlDropdownItem,
GlTabs, GlTabs,
GlTab, GlTab,
GlBadge, GlDeprecatedBadge as GlBadge,
} from '@gitlab/ui'; } from '@gitlab/ui';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
......
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { GlBadge, GlLink, GlLoadingIcon, GlPagination, GlTable } from '@gitlab/ui'; import {
GlDeprecatedBadge as GlBadge,
GlLink,
GlLoadingIcon,
GlPagination,
GlTable,
} from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import { CLUSTER_TYPES, STATUSES } from '../constants'; import { CLUSTER_TYPES, STATUSES } from '../constants';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
......
...@@ -8,10 +8,10 @@ export const severityLevel = { ...@@ -8,10 +8,10 @@ export const severityLevel = {
export const severityLevelVariant = { export const severityLevelVariant = {
[severityLevel.FATAL]: 'danger', [severityLevel.FATAL]: 'danger',
[severityLevel.ERROR]: 'dark', [severityLevel.ERROR]: 'neutral',
[severityLevel.WARNING]: 'warning', [severityLevel.WARNING]: 'warning',
[severityLevel.INFO]: 'info', [severityLevel.INFO]: 'info',
[severityLevel.DEBUG]: 'light', [severityLevel.DEBUG]: 'muted',
}; };
export const errorStatus = { export const errorStatus = {
......
...@@ -363,16 +363,10 @@ export default { ...@@ -363,16 +363,10 @@ export default {
<h2 class="text-truncate">{{ error.title }}</h2> <h2 class="text-truncate">{{ error.title }}</h2>
</tooltip-on-truncate> </tooltip-on-truncate>
<template v-if="error.tags"> <template v-if="error.tags">
<gl-badge <gl-badge v-if="error.tags.level" :variant="errorSeverityVariant" class="mr-2">
v-if="error.tags.level"
:variant="errorSeverityVariant"
class="rounded-pill mr-2"
>
{{ errorLevel }} {{ errorLevel }}
</gl-badge> </gl-badge>
<gl-badge v-if="error.tags.logger" variant="light" class="rounded-pill" <gl-badge v-if="error.tags.logger" variant="muted">{{ error.tags.logger }} </gl-badge>
>{{ error.tags.logger }}
</gl-badge>
</template> </template>
<ul> <ul>
<li v-if="error.gitlabCommit"> <li v-if="error.gitlabCommit">
......
...@@ -234,11 +234,7 @@ export default { ...@@ -234,11 +234,7 @@ export default {
class="alert-current-setting cursor-pointer d-flex" class="alert-current-setting cursor-pointer d-flex"
@click="showModal" @click="showModal"
> >
<gl-badge <gl-badge :variant="isFiring ? 'danger' : 'neutral'" class="d-flex-center text-truncate">
:variant="isFiring ? 'danger' : 'secondary'"
pill
class="d-flex-center text-truncate"
>
<gl-icon name="warning" :size="16" class="flex-shrink-0" /> <gl-icon name="warning" :size="16" class="flex-shrink-0" />
<span class="text-truncate gl-pl-1-deprecated-no-really-do-not-use-me"> <span class="text-truncate gl-pl-1-deprecated-no-really-do-not-use-me">
<gl-sprintf <gl-sprintf
......
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
<div class="d-flex flex-column align-items-start flex-shrink-0 mr-4 mb-3 js-issues-container"> <div class="d-flex flex-column align-items-start flex-shrink-0 mr-4 mb-3 js-issues-container">
<span class="mb-1"> <span class="mb-1">
{{ __('Issues') }} {{ __('Issues') }}
<gl-badge pill variant="light" class="font-weight-bold">{{ totalIssuesCount }}</gl-badge> <gl-badge variant="muted" size="sm">{{ totalIssuesCount }}</gl-badge>
</span> </span>
<div class="d-flex"> <div class="d-flex">
<gl-link v-if="openIssuesPath" ref="openIssuesLink" :href="openIssuesPath"> <gl-link v-if="openIssuesPath" ref="openIssuesLink" :href="openIssuesPath">
......
...@@ -147,8 +147,11 @@ export default { ...@@ -147,8 +147,11 @@ export default {
class="mr-1 position-relative text-secondary" class="mr-1 position-relative text-secondary"
/><span class="position-relative">{{ fullPath }}</span> /><span class="position-relative">{{ fullPath }}</span>
</component> </component>
<!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings --> <!-- eslint-disable @gitlab/vue-require-i18n-strings -->
<gl-badge v-if="lfsOid" variant="default" class="label-lfs ml-1">LFS</gl-badge> <gl-badge v-if="lfsOid" variant="muted" size="sm" class="ml-1" data-qa-selector="label-lfs"
>LFS</gl-badge
>
<!-- eslint-enable @gitlab/vue-require-i18n-strings -->
<template v-if="isSubmodule"> <template v-if="isSubmodule">
@ <gl-link :href="submoduleTreeUrl" class="commit-sha">{{ shortSha }}</gl-link> @ <gl-link :href="submoduleTreeUrl" class="commit-sha">{{ shortSha }}</gl-link>
</template> </template>
......
...@@ -187,7 +187,7 @@ h3.popover-header { ...@@ -187,7 +187,7 @@ h3.popover-header {
// Add to .label so that old system notes that are saved to the db // Add to .label so that old system notes that are saved to the db
// will still receive the correct styling // will still receive the correct styling
.badge, .badge:not(.gl-badge),
.label { .label {
padding: 4px 5px; padding: 4px 5px;
font-size: 12px; font-size: 12px;
......
.badge.badge-pill { .badge.badge-pill:not(.gl-badge) {
font-weight: $gl-font-weight-normal; font-weight: $gl-font-weight-normal;
background-color: $badge-bg; background-color: $badge-bg;
color: $gray-800; color: $gray-800;
......
---
title: Update the visual design of badges in some areas
merge_request: 31646
author:
type: other
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
<template v-else> <template v-else>
<div> <div>
<span class="font-weight-bold">{{ __('Merge Requests in Review') }}</span> <span class="font-weight-bold">{{ __('Merge Requests in Review') }}</span>
<gl-badge pill>{{ totalItems }}</gl-badge> <gl-badge size="sm">{{ totalItems }}</gl-badge>
</div> </div>
<merge-request-table /> <merge-request-table />
<gl-pagination <gl-pagination
......
<script> <script>
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import { GlBadge, GlIcon, GlLink, GlButton, GlSkeletonLoading, GlTable } from '@gitlab/ui'; import {
GlDeprecatedBadge as GlBadge,
GlIcon,
GlLink,
GlButton,
GlSkeletonLoading,
GlTable,
} from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import DependencyLicenseLinks from './dependency_license_links.vue'; import DependencyLicenseLinks from './dependency_license_links.vue';
import DependencyVulnerabilities from './dependency_vulnerabilities.vue'; import DependencyVulnerabilities from './dependency_vulnerabilities.vue';
......
<script> <script>
import { escape, isEmpty } from 'lodash'; import { escape, isEmpty } from 'lodash';
import { GlTooltipDirective, GlLink, GlBadge } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlDeprecatedBadge as GlBadge } from '@gitlab/ui';
import Alerts from 'ee/vue_shared/dashboards/components/alerts.vue'; import Alerts from 'ee/vue_shared/dashboards/components/alerts.vue';
import TimeAgo from 'ee/vue_shared/dashboards/components/time_ago.vue'; import TimeAgo from 'ee/vue_shared/dashboards/components/time_ago.vue';
import { STATUS_FAILED } from 'ee/vue_shared/dashboards/constants'; import { STATUS_FAILED } from 'ee/vue_shared/dashboards/constants';
......
<script> <script>
import { GlLink, GlBadge, GlTooltipDirective } from '@gitlab/ui'; import { GlLink, GlDeprecatedBadge as GlBadge, GlTooltipDirective } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue'; import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue';
......
...@@ -3,7 +3,7 @@ import Vue from 'vue'; ...@@ -3,7 +3,7 @@ import Vue from 'vue';
import { memoize, isString, cloneDeep, isNumber } from 'lodash'; import { memoize, isString, cloneDeep, isNumber } from 'lodash';
import { import {
GlDeprecatedButton, GlDeprecatedButton,
GlBadge, GlDeprecatedBadge as GlBadge,
GlTooltip, GlTooltip,
GlTooltipDirective, GlTooltipDirective,
GlFormTextarea, GlFormTextarea,
......
<script> <script>
import { GlBadge } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import GeoNodeForm from './geo_node_form.vue'; import GeoNodeForm from './geo_node_form.vue';
......
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
GlIcon, GlIcon,
GlTab, GlTab,
GlTabs, GlTabs,
GlBadge, GlDeprecatedBadge as GlBadge,
GlAlert, GlAlert,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { LICENSE_LIST } from '../store/constants'; import { LICENSE_LIST } from '../store/constants';
......
<script> <script>
import { GlLink, GlSkeletonLoading, GlBadge, GlIcon, GlFriendlyWrap } from '@gitlab/ui'; import {
GlLink,
GlSkeletonLoading,
GlDeprecatedBadge as GlBadge,
GlIcon,
GlFriendlyWrap,
} from '@gitlab/ui';
import LicenseComponentLinks from './license_component_links.vue'; import LicenseComponentLinks from './license_component_links.vue';
import { LICENSE_APPROVAL_CLASSIFICATION } from 'ee/vue_shared/license_compliance/constants'; import { LICENSE_APPROVAL_CLASSIFICATION } from 'ee/vue_shared/license_compliance/constants';
......
...@@ -57,8 +57,8 @@ export default { ...@@ -57,8 +57,8 @@ export default {
tagBadgeClass(index) { tagBadgeClass(index) {
return { return {
'd-none': true, 'd-none': true,
'd-block': this.tagCount === 1, 'd-flex': this.tagCount === 1,
'd-md-block': this.tagCount > 1, 'd-md-flex': this.tagCount > 1,
'append-right-4': index !== this.tagsToRender.length - 1, 'append-right-4': index !== this.tagsToRender.length - 1,
'prepend-left-8': !this.hideLabel && index === 0, 'prepend-left-8': !this.hideLabel && index === 0,
}; };
...@@ -87,9 +87,9 @@ export default { ...@@ -87,9 +87,9 @@ export default {
v-if="moreTagsDisplay" v-if="moreTagsDisplay"
ref="moreBadge" ref="moreBadge"
v-gl-tooltip v-gl-tooltip
variant="light" variant="muted"
:title="moreTagsTooltip" :title="moreTagsTooltip"
class="d-none d-md-block prepend-left-4" class="d-none d-md-flex prepend-left-4"
><gl-sprintf :message="__('+%{tags} more')"> ><gl-sprintf :message="__('+%{tags} more')">
<template #tags> <template #tags>
{{ moreTagsDisplay }} {{ moreTagsDisplay }}
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
<gl-badge <gl-badge
v-if="moreTagsDisplay && hideLabel" v-if="moreTagsDisplay && hideLabel"
ref="moreBadge" ref="moreBadge"
variant="light" variant="muted"
class="d-md-none prepend-left-4" class="d-md-none prepend-left-4"
>{{ tagsDisplay }}</gl-badge >{{ tagsDisplay }}</gl-badge
> >
......
<script> <script>
import { GlLink, GlBadge, GlButton } from '@gitlab/ui'; import { GlLink, GlDeprecatedBadge as GlBadge, GlButton } from '@gitlab/ui';
import { FilterState } from '../constants'; import { FilterState } from '../constants';
......
<script> <script>
import { GlBadge, GlDeprecatedButton, GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui'; import {
GlDeprecatedBadge as GlBadge,
GlDeprecatedButton,
GlLoadingIcon,
GlTooltipDirective,
} from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
......
<script> <script>
import { GlBadge, GlTabs, GlTab, GlLink } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge, GlTabs, GlTab, GlLink } from '@gitlab/ui';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
......
<script> <script>
import { GlBadge } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
export default { export default {
......
<script> <script>
import { GlBadge, GlPopover } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge, GlPopover } from '@gitlab/ui';
export default { export default {
name: 'RemediatedBadge', name: 'RemediatedBadge',
......
import { nextTick } from 'vue'; import { nextTick } from 'vue';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { GlBadge, GlButton, GlLink, GlSkeletonLoading } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge, GlButton, GlLink, GlSkeletonLoading } from '@gitlab/ui';
import stubChildren from 'helpers/stub_children'; import stubChildren from 'helpers/stub_children';
import DependenciesTable from 'ee/dependencies/components/dependencies_table.vue'; import DependenciesTable from 'ee/dependencies/components/dependencies_table.vue';
import DependencyLicenseLinks from 'ee/dependencies/components/dependency_license_links.vue'; import DependencyLicenseLinks from 'ee/dependencies/components/dependency_license_links.vue';
......
import { shallowMount, mount } from '@vue/test-utils'; import { shallowMount, mount } from '@vue/test-utils';
import { GlLink, GlBadge } from '@gitlab/ui'; import { GlLink, GlDeprecatedBadge as GlBadge } from '@gitlab/ui';
import component from 'ee/environments_dashboard/components/dashboard/environment_header.vue'; import component from 'ee/environments_dashboard/components/dashboard/environment_header.vue';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue'; import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue';
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlBadge } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge } from '@gitlab/ui';
import GeoNodeFormApp from 'ee/geo_node_form/components/app.vue'; import GeoNodeFormApp from 'ee/geo_node_form/components/app.vue';
import GeoNodeForm from 'ee/geo_node_form/components/geo_node_form.vue'; import GeoNodeForm from 'ee/geo_node_form/components/geo_node_form.vue';
import { MOCK_SELECTIVE_SYNC_TYPES, MOCK_SYNC_SHARDS } from '../mock_data'; import { MOCK_SELECTIVE_SYNC_TYPES, MOCK_SYNC_SHARDS } from '../mock_data';
......
...@@ -2,7 +2,14 @@ import { shallowMount, mount } from '@vue/test-utils'; ...@@ -2,7 +2,14 @@ import { shallowMount, mount } from '@vue/test-utils';
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { GlEmptyState, GlLoadingIcon, GlTab, GlTabs, GlAlert, GlBadge } from '@gitlab/ui'; import {
GlEmptyState,
GlLoadingIcon,
GlTab,
GlTabs,
GlAlert,
GlDeprecatedBadge as GlBadge,
} from '@gitlab/ui';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import setWindowLocation from 'helpers/set_window_location_helper'; import setWindowLocation from 'helpers/set_window_location_helper';
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlLink, GlSkeletonLoading, GlBadge, GlFriendlyWrap } from '@gitlab/ui'; import {
GlLink,
GlSkeletonLoading,
GlDeprecatedBadge as GlBadge,
GlFriendlyWrap,
} from '@gitlab/ui';
import LicenseComponentLinks from 'ee/license_compliance/components/license_component_links.vue'; import LicenseComponentLinks from 'ee/license_compliance/components/license_component_links.vue';
import LicensesTableRow from 'ee/license_compliance/components/licenses_table_row.vue'; import LicensesTableRow from 'ee/license_compliance/components/licenses_table_row.vue';
import { makeLicense } from './utils'; import { makeLicense } from './utils';
......
...@@ -73,25 +73,25 @@ describe('PackageTags', () => { ...@@ -73,25 +73,25 @@ describe('PackageTags', () => {
it('shows tag badge when there is only one', () => { it('shows tag badge when there is only one', () => {
createComponent([mockTags[0]]); createComponent([mockTags[0]]);
const expectedStyle = [...defaultStyle, 'd-block', 'prepend-left-8']; const expectedStyle = [...defaultStyle, 'd-flex', 'prepend-left-8'];
expect( expect(
tagBadges() tagBadges()
.at(0) .at(0)
.classes(), .classes(),
).toEqual(expectedStyle); ).toEqual(expect.arrayContaining(expectedStyle));
}); });
it('shows tag badge for medium or heigher resolutions', () => { it('shows tag badge for medium or heigher resolutions', () => {
createComponent(mockTags); createComponent(mockTags);
const expectedStyle = [...defaultStyle, 'd-md-block']; const expectedStyle = [...defaultStyle, 'd-md-flex'];
expect( expect(
tagBadges() tagBadges()
.at(1) .at(1)
.classes(), .classes(),
).toEqual(expectedStyle); ).toEqual(expect.arrayContaining(expectedStyle));
}); });
it('correctly prepends left and appends right when there is more than one tag', () => { it('correctly prepends left and appends right when there is more than one tag', () => {
...@@ -99,15 +99,17 @@ describe('PackageTags', () => { ...@@ -99,15 +99,17 @@ describe('PackageTags', () => {
tagDisplayLimit: 4, tagDisplayLimit: 4,
}); });
const expectedStyleWithoutAppend = [...defaultStyle, 'd-md-block']; const expectedStyleWithoutAppend = [...defaultStyle, 'd-md-flex'];
const expectedStyleWithAppend = [...expectedStyleWithoutAppend, 'append-right-4']; const expectedStyleWithAppend = [...expectedStyleWithoutAppend, 'append-right-4'];
const allBadges = tagBadges(); const allBadges = tagBadges();
expect(allBadges.at(0).classes()).toEqual([...expectedStyleWithAppend, 'prepend-left-8']); expect(allBadges.at(0).classes()).toEqual(
expect(allBadges.at(1).classes()).toEqual(expectedStyleWithAppend); expect.arrayContaining([...expectedStyleWithAppend, 'prepend-left-8']),
expect(allBadges.at(2).classes()).toEqual(expectedStyleWithAppend); );
expect(allBadges.at(3).classes()).toEqual(expectedStyleWithoutAppend); expect(allBadges.at(1).classes()).toEqual(expect.arrayContaining(expectedStyleWithAppend));
expect(allBadges.at(2).classes()).toEqual(expect.arrayContaining(expectedStyleWithAppend));
expect(allBadges.at(3).classes()).toEqual(expect.arrayContaining(expectedStyleWithoutAppend));
}); });
}); });
}); });
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlLink, GlBadge, GlButton } from '@gitlab/ui'; import { GlLink, GlDeprecatedBadge as GlBadge, GlButton } from '@gitlab/ui';
import RequirementsTabs from 'ee/requirements/components/requirements_tabs.vue'; import RequirementsTabs from 'ee/requirements/components/requirements_tabs.vue';
import { FilterState } from 'ee/requirements/constants'; import { FilterState } from 'ee/requirements/constants';
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlBadge, GlDeprecatedButton, GlLoadingIcon } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge, GlDeprecatedButton, GlLoadingIcon } from '@gitlab/ui';
import ProjectList from 'ee/security_dashboard/components/project_list.vue'; import ProjectList from 'ee/security_dashboard/components/project_list.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlBadge, GlPopover } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge, GlPopover } from '@gitlab/ui';
import RemediatedBadge from 'ee/vulnerabilities/components/remediated_badge.vue'; import RemediatedBadge from 'ee/vulnerabilities/components/remediated_badge.vue';
const POPOVER_TITLE = 'Vulnerability remediated. Review before resolving.'; const POPOVER_TITLE = 'Vulnerability remediated. Review before resolving.';
......
...@@ -24,7 +24,7 @@ describe 'Projects tree', :js do ...@@ -24,7 +24,7 @@ describe 'Projects tree', :js do
expect(page).to have_selector('.tree-item') expect(page).to have_selector('.tree-item')
expect(page).to have_content('add tests for .gitattributes custom highlighting') expect(page).to have_content('add tests for .gitattributes custom highlighting')
expect(page).not_to have_selector('.flash-alert') expect(page).not_to have_selector('.flash-alert')
expect(page).not_to have_selector('.label-lfs', text: 'LFS') expect(page).not_to have_selector('[data-qa-selector="label-lfs"]', text: 'LFS')
end end
it 'renders tree table for a subtree without errors' do it 'renders tree table for a subtree without errors' do
...@@ -33,7 +33,7 @@ describe 'Projects tree', :js do ...@@ -33,7 +33,7 @@ describe 'Projects tree', :js do
expect(page).to have_selector('.tree-item') expect(page).to have_selector('.tree-item')
expect(page).to have_content('add spaces in whitespace file') expect(page).to have_content('add spaces in whitespace file')
expect(page).not_to have_selector('.label-lfs', text: 'LFS') expect(page).not_to have_selector('[data-qa-selector="label-lfs"]', text: 'LFS')
expect(page).not_to have_selector('.flash-alert') expect(page).not_to have_selector('.flash-alert')
end end
...@@ -86,7 +86,7 @@ describe 'Projects tree', :js do ...@@ -86,7 +86,7 @@ describe 'Projects tree', :js do
it 'renders LFS badge on blob item' do it 'renders LFS badge on blob item' do
visit project_tree_path(project, File.join('master', 'files/lfs')) visit project_tree_path(project, File.join('master', 'files/lfs'))
expect(page).to have_selector('.label-lfs', text: 'LFS') expect(page).to have_selector('[data-qa-selector="label-lfs"]', text: 'LFS')
end end
end end
......
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
GlDropdownItem, GlDropdownItem,
GlIcon, GlIcon,
GlTab, GlTab,
GlBadge, GlDeprecatedBadge as GlBadge,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { visitUrl } from '~/lib/utils/url_utility'; import { visitUrl } from '~/lib/utils/url_utility';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue'; import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
......
...@@ -248,7 +248,7 @@ describe('ErrorDetails', () => { ...@@ -248,7 +248,7 @@ describe('ErrorDetails', () => {
}, },
}); });
return wrapper.vm.$nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlBadge).attributes('variant')).toEqual( expect(wrapper.find(GlBadge).props('variant')).toEqual(
severityLevelVariant[severityLevel[level]], severityLevelVariant[severityLevel[level]],
); );
}); });
...@@ -262,7 +262,7 @@ describe('ErrorDetails', () => { ...@@ -262,7 +262,7 @@ describe('ErrorDetails', () => {
}, },
}); });
return wrapper.vm.$nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlBadge).attributes('variant')).toEqual( expect(wrapper.find(GlBadge).props('variant')).toEqual(
severityLevelVariant[severityLevel.ERROR], severityLevelVariant[severityLevel.ERROR],
); );
}); });
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
exports[`AlertWidget Alert firing displays a warning icon and matches snapshot 1`] = ` exports[`AlertWidget Alert firing displays a warning icon and matches snapshot 1`] = `
<gl-badge-stub <gl-badge-stub
class="d-flex-center text-truncate" class="d-flex-center text-truncate"
pill="" size="md"
variant="danger" variant="danger"
> >
<gl-icon-stub <gl-icon-stub
...@@ -25,8 +25,8 @@ exports[`AlertWidget Alert firing displays a warning icon and matches snapshot 1 ...@@ -25,8 +25,8 @@ exports[`AlertWidget Alert firing displays a warning icon and matches snapshot 1
exports[`AlertWidget Alert not firing displays a warning icon and matches snapshot 1`] = ` exports[`AlertWidget Alert not firing displays a warning icon and matches snapshot 1`] = `
<gl-badge-stub <gl-badge-stub
class="d-flex-center text-truncate" class="d-flex-center text-truncate"
pill="" size="md"
variant="secondary" variant="neutral"
> >
<gl-icon-stub <gl-icon-stub
class="flex-shrink-0" class="flex-shrink-0"
......
...@@ -787,10 +787,10 @@ ...@@ -787,10 +787,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.130.0.tgz#0c2f3cdc0a4b0f54c47b2861c8fa31b2a58c570a" resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.130.0.tgz#0c2f3cdc0a4b0f54c47b2861c8fa31b2a58c570a"
integrity sha512-azJ1E9PBk6fGOaP6816BSr8oYrQu3m3BbYZwWOCUp8AfbZuf0ZOZVYmlR9i/eAOhoqqqmwF8hYCK2VjAklbpPA== integrity sha512-azJ1E9PBk6fGOaP6816BSr8oYrQu3m3BbYZwWOCUp8AfbZuf0ZOZVYmlR9i/eAOhoqqqmwF8hYCK2VjAklbpPA==
"@gitlab/ui@15.6.0": "@gitlab/ui@16.0":
version "15.6.0" version "16.0.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-15.6.0.tgz#0fc4ca7fd6ecc3c1be7e127dce3dde78fb4faa06" resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-16.0.0.tgz#0e2d19b85c47f45a052caf6cd0367613cbab8e8e"
integrity sha512-drb+f+xcAOtov2mAE3FX49845Fe4o41/jTKDxONDlsescKggZBXaSl1PQtL4EkspllIFb3JYdvL0sXbmp/dz3w== integrity sha512-xSWXtFWWQzGtL35dGexc5LGqAJXYjLMEFQyPLzCBX3yY9tkI9s9rVMX053tnKYb9kgEmL+R/xGiW7D9nb58VmQ==
dependencies: dependencies:
"@babel/standalone" "^7.0.0" "@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0" "@gitlab/vue-toasted" "^1.3.0"
......
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