Commit 94fae0df authored by Jarek Ostrowski's avatar Jarek Ostrowski

Update suggest gitlab ci popover button

MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37987
parent dc6b984c
<script>
import { GlPopover, GlSprintf, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { GlPopover, GlSprintf, GlButton } from '@gitlab/ui';
import { parseBoolean, scrollToElement, setCookie, getCookie } from '~/lib/utils/common_utils';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
......@@ -29,8 +29,7 @@ export default {
components: {
GlPopover,
GlSprintf,
GlIcon,
GlDeprecatedButton,
GlButton,
},
mixins: [trackingMixin],
props: {
......@@ -112,18 +111,17 @@ export default {
<template #title>
<span v-html="suggestTitle"></span>
<span class="ml-auto">
<gl-deprecated-button
<gl-button
:aria-label="__('Close')"
class="btn-blank"
name="dismiss"
icon="close"
:data-track-property="humanAccess"
:data-track-value="$options.dismissTrackValue"
:data-track-event="$options.clickTrackValue"
:data-track-label="trackLabel"
@click="onDismiss"
>
<gl-icon name="close" aria-hidden="true" />
</gl-deprecated-button>
/>
</span>
</template>
......
---
title: Update suggest gitlab ci popover to gl-button
merge_request: 37987
author:
type: changed
......@@ -2,7 +2,7 @@ import { shallowMount } from '@vue/test-utils';
import Popover from '~/blob/suggest_gitlab_ci_yml/components/popover.vue';
import { mockTracking, unmockTracking, triggerEvent } from 'helpers/tracking_helper';
import * as utils from '~/lib/utils/common_utils';
import { GlDeprecatedButton } from '@gitlab/ui';
import { GlButton } from '@gitlab/ui';
jest.mock('~/lib/utils/common_utils', () => ({
...jest.requireActual('~/lib/utils/common_utils'),
......@@ -96,7 +96,7 @@ describe('Suggest gitlab-ci.yml Popover', () => {
const expectedAction = 'click_button';
const expectedProperty = 'owner';
const expectedValue = '10';
const dismissButton = wrapper.find(GlDeprecatedButton);
const dismissButton = wrapper.find(GlButton);
trackingSpy = mockTracking('_category_', wrapper.element, jest.spyOn);
triggerEvent(dismissButton.element);
......
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