Commit 6b0cbc28 authored by Mark Florian's avatar Mark Florian

Merge branch '350372' into 'master'

Update geo node health status badge

See merge request gitlab-org/gitlab!80075
parents f59fb5f0 c8e65e4e
<script> <script>
import { GlIcon, GlBadge } from '@gitlab/ui'; import { GlBadge } from '@gitlab/ui';
import { HEALTH_STATUS_UI } from 'ee/geo_nodes/constants'; import { HEALTH_STATUS_UI } from 'ee/geo_nodes/constants';
export default { export default {
components: { components: {
GlIcon,
GlBadge, GlBadge,
}, },
props: { props: {
...@@ -23,8 +22,7 @@ export default { ...@@ -23,8 +22,7 @@ export default {
</script> </script>
<template> <template>
<gl-badge :variant="statusUi.variant"> <gl-badge :variant="statusUi.variant" :icon="statusUi.icon" class="gl-font-weight-bold!">
<gl-icon :name="statusUi.icon" /> {{ statusUi.text }}
<span class="gl-ml-2 gl-font-weight-bold">{{ statusUi.text }}</span>
</gl-badge> </gl-badge>
</template> </template>
import { GlIcon, GlBadge } from '@gitlab/ui'; import { GlBadge } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import GeoNodeHealthStatus from 'ee/geo_nodes/components/header/geo_node_health_status.vue'; import GeoNodeHealthStatus from 'ee/geo_nodes/components/header/geo_node_health_status.vue';
import { HEALTH_STATUS_UI } from 'ee/geo_nodes/constants'; import { HEALTH_STATUS_UI } from 'ee/geo_nodes/constants';
...@@ -24,8 +24,6 @@ describe('GeoNodeHealthStatus', () => { ...@@ -24,8 +24,6 @@ describe('GeoNodeHealthStatus', () => {
}); });
const findGeoStatusBadge = () => wrapper.findComponent(GlBadge); const findGeoStatusBadge = () => wrapper.findComponent(GlBadge);
const findGeoStatusIcon = () => wrapper.findComponent(GlIcon);
const findGeoStatusText = () => wrapper.find('span');
describe.each` describe.each`
status | uiData status | uiData
...@@ -46,11 +44,11 @@ describe('GeoNodeHealthStatus', () => { ...@@ -46,11 +44,11 @@ describe('GeoNodeHealthStatus', () => {
}); });
it(`renders icon to ${uiData.icon}`, () => { it(`renders icon to ${uiData.icon}`, () => {
expect(findGeoStatusIcon().attributes('name')).toBe(uiData.icon); expect(findGeoStatusBadge().props('icon')).toBe(uiData.icon);
}); });
it(`renders status text to ${uiData.text}`, () => { it(`renders status text to ${uiData.text}`, () => {
expect(findGeoStatusText().text()).toBe(uiData.text); expect(findGeoStatusBadge().text()).toBe(uiData.text);
}); });
}); });
}); });
......
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