Make remediated-badge Pajamas compliant

Replaces ad hoc icon with GlBadge's icon prop in remediated_badge.vue.
parent aed836d7
<script>
import { GlIcon, GlPopover, GlBadge } from '@gitlab/ui';
import { GlPopover, GlBadge } from '@gitlab/ui';
export default {
components: {
GlIcon,
GlPopover,
GlBadge,
},
......@@ -25,9 +24,7 @@ export default {
<template>
<div class="gl-display-inline-block">
<gl-badge ref="badge" variant="info">
<gl-icon name="check-circle-dashed" />
</gl-badge>
<gl-badge ref="badge" variant="info" icon="check-circle-dashed" />
<gl-popover
ref="popover"
:content="
......
import { GlIcon, GlPopover, GlBadge } from '@gitlab/ui';
import { GlPopover, GlBadge } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import RemediatedBadge from 'ee/vulnerabilities/components/remediated_badge.vue';
......@@ -9,7 +9,6 @@ const POPOVER_CONTENT =
describe('Remediated badge component', () => {
let wrapper;
const findIcon = () => wrapper.find(GlIcon);
const findBadge = () => wrapper.find(GlBadge);
const createWrapper = () => {
......@@ -23,7 +22,7 @@ describe('Remediated badge component', () => {
afterEach(() => wrapper.destroy());
it('should display the correct icon', () => {
expect(findIcon().props('name')).toBe('check-circle-dashed');
expect(findBadge().props('icon')).toBe('check-circle-dashed');
});
it('should link the badge and the popover', () => {
......
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