Commit 02ca34d4 authored by David O'Regan's avatar David O'Regan Committed by Mark Florian

Update badges in states table

Addresses https://gitlab.com/gitlab-org/gitlab/-/issues/350369.
parent eb9d5548
<script> <script>
import { import { GlAlert, GlBadge, GlLink, GlLoadingIcon, GlSprintf, GlTable, GlTooltip } from '@gitlab/ui';
GlAlert,
GlBadge,
GlIcon,
GlLink,
GlLoadingIcon,
GlSprintf,
GlTable,
GlTooltip,
} from '@gitlab/ui';
import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import CiBadge from '~/vue_shared/components/ci_badge_link.vue'; import CiBadge from '~/vue_shared/components/ci_badge_link.vue';
...@@ -21,7 +12,6 @@ export default { ...@@ -21,7 +12,6 @@ export default {
CiBadge, CiBadge,
GlAlert, GlAlert,
GlBadge, GlBadge,
GlIcon,
GlLink, GlLink,
GlLoadingIcon, GlLoadingIcon,
GlSprintf, GlSprintf,
...@@ -156,8 +146,7 @@ export default { ...@@ -156,8 +146,7 @@ export default {
:id="`terraformLockedBadgeContainer${item.name}`" :id="`terraformLockedBadgeContainer${item.name}`"
class="gl-mx-3" class="gl-mx-3"
> >
<gl-badge :id="`terraformLockedBadge${item.name}`"> <gl-badge :id="`terraformLockedBadge${item.name}`" icon="lock">
<gl-icon name="lock" />
{{ $options.i18n.locked }} {{ $options.i18n.locked }}
</gl-badge> </gl-badge>
......
import { GlIcon, GlLoadingIcon, GlTooltip } from '@gitlab/ui'; import { GlBadge, GlLoadingIcon, GlTooltip } from '@gitlab/ui';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { nextTick } from 'vue'; import { nextTick } from 'vue';
import { useFakeDate } from 'helpers/fake_date'; import { useFakeDate } from 'helpers/fake_date';
...@@ -139,7 +139,7 @@ describe('StatesTable', () => { ...@@ -139,7 +139,7 @@ describe('StatesTable', () => {
const toolTip = state.find(GlTooltip); const toolTip = state.find(GlTooltip);
expect(state.text()).toContain(name); expect(state.text()).toContain(name);
expect(state.find(GlIcon).exists()).toBe(locked); expect(state.find(GlBadge).exists()).toBe(locked);
expect(state.find(GlLoadingIcon).exists()).toBe(loading); expect(state.find(GlLoadingIcon).exists()).toBe(loading);
expect(toolTip.exists()).toBe(locked); expect(toolTip.exists()).toBe(locked);
......
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