Commit 736545a5 authored by Amelia Bauerly's avatar Amelia Bauerly Committed by Olena Horal-Koretska

Swapping deprecated error tracking buttons

parent acaf79ee
<script> <script>
import { GlDeprecatedButton, GlIcon, GlButtonGroup, GlTooltipDirective } from '@gitlab/ui'; import { GlButton, GlIcon, GlButtonGroup, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
const IGNORED = 'ignored'; const IGNORED = 'ignored';
...@@ -10,7 +10,7 @@ const statusValidation = [IGNORED, RESOLVED, UNRESOLVED]; ...@@ -10,7 +10,7 @@ const statusValidation = [IGNORED, RESOLVED, UNRESOLVED];
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
GlIcon, GlIcon,
GlButtonGroup, GlButtonGroup,
}, },
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
<template> <template>
<div> <div>
<gl-button-group class="gl-flex-direction-column flex-md-row gl-ml-0 ml-md-n4"> <gl-button-group class="gl-flex-direction-column flex-md-row gl-ml-0 ml-md-n4">
<gl-deprecated-button <gl-button
:key="ignoreBtn.status" :key="ignoreBtn.status"
:ref="`${ignoreBtn.title.toLowerCase()}Error`" :ref="`${ignoreBtn.title.toLowerCase()}Error`"
v-gl-tooltip.hover v-gl-tooltip.hover
...@@ -55,8 +55,8 @@ export default { ...@@ -55,8 +55,8 @@ export default {
> >
<gl-icon class="gl-display-none d-md-inline gl-m-0" :name="ignoreBtn.icon" :size="12" /> <gl-icon class="gl-display-none d-md-inline gl-m-0" :name="ignoreBtn.icon" :size="12" />
<span class="d-md-none">{{ ignoreBtn.title }}</span> <span class="d-md-none">{{ ignoreBtn.title }}</span>
</gl-deprecated-button> </gl-button>
<gl-deprecated-button <gl-button
:key="resolveBtn.status" :key="resolveBtn.status"
:ref="`${resolveBtn.title.toLowerCase()}Error`" :ref="`${resolveBtn.title.toLowerCase()}Error`"
v-gl-tooltip.hover v-gl-tooltip.hover
...@@ -66,15 +66,15 @@ export default { ...@@ -66,15 +66,15 @@ export default {
> >
<gl-icon class="gl-display-none d-md-inline gl-m-0" :name="resolveBtn.icon" :size="12" /> <gl-icon class="gl-display-none d-md-inline gl-m-0" :name="resolveBtn.icon" :size="12" />
<span class="d-md-none">{{ resolveBtn.title }}</span> <span class="d-md-none">{{ resolveBtn.title }}</span>
</gl-deprecated-button> </gl-button>
</gl-button-group> </gl-button-group>
<gl-deprecated-button <gl-button
:href="detailsLink" :href="detailsLink"
category="secondary" category="primary"
variant="info" variant="info"
class="gl-display-block d-md-none gl-mb-4 mb-md-0" class="gl-display-block d-md-none gl-mb-4 mb-md-0"
> >
{{ __('More details') }} {{ __('More details') }}
</gl-deprecated-button> </gl-button>
</div> </div>
</template> </template>
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import ErrorTrackingActions from '~/error_tracking/components/error_tracking_actions.vue'; import ErrorTrackingActions from '~/error_tracking/components/error_tracking_actions.vue';
describe('Error Tracking Actions', () => { describe('Error Tracking Actions', () => {
...@@ -20,7 +20,7 @@ describe('Error Tracking Actions', () => { ...@@ -20,7 +20,7 @@ describe('Error Tracking Actions', () => {
}, },
...props, ...props,
}, },
stubs: { GlDeprecatedButton }, stubs: { GlButton },
}); });
} }
...@@ -34,7 +34,7 @@ describe('Error Tracking Actions', () => { ...@@ -34,7 +34,7 @@ describe('Error Tracking Actions', () => {
} }
}); });
const findButtons = () => wrapper.findAll(GlDeprecatedButton); const findButtons = () => wrapper.findAll(GlButton);
describe('when error status is unresolved', () => { describe('when error status is unresolved', () => {
it('renders the correct actions buttons to allow ignore and resolve', () => { it('renders the correct actions buttons to allow ignore and resolve', () => {
......
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