Commit c28eb28e authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'review-app-button' into 'master'

Update deprecated review_app button

Closes #219909

See merge request gitlab-org/gitlab!38351
parents 29ce41dc 8ee95962
<script>
import {
GlDeprecatedButton,
GlButton,
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
GlModal,
......@@ -14,7 +14,7 @@ import { s__, sprintf } from '~/locale';
export default {
components: {
GlDeprecatedButton,
GlButton,
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
GlModal,
......@@ -155,14 +155,16 @@ export default {
</script>
<template>
<div class="inline">
<gl-deprecated-button
<gl-button
v-gl-modal="modalId"
class="btn btn-default btn-sm gl-ml-3 js-review-button"
category="secondary"
class="gl-ml-3 js-review-button"
size="small"
:class="cssClass"
type="button"
>
{{ s__('VisualReviewApp|Review') }}
</gl-deprecated-button>
</gl-button>
<gl-modal
ref="modal"
:modal-id="modalId"
......@@ -198,9 +200,9 @@ export default {
</p>
<p v-html="instructionText.step4"></p>
<template #modal-footer>
<gl-deprecated-button @click="cancel">
<gl-button category="secondary" @click="cancel">
{{ s__('VisualReviewApp|Cancel') }}
</gl-deprecated-button>
</gl-button>
<gl-deprecated-dropdown
v-if="shouldShowChanges"
dropup
......
import { mount } from '@vue/test-utils';
import VisualReviewAppLink from 'ee/vue_merge_request_widget/components/visual_review_app_link.vue';
import { GlDeprecatedButton, GlDeprecatedDropdown, GlModal } from '@gitlab/ui';
import { GlButton, GlDeprecatedDropdown, GlModal } from '@gitlab/ui';
import { mockTracking, triggerEvent } from 'helpers/tracking_helper';
import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue';
......@@ -46,11 +46,11 @@ describe('Visual Review App Link', () => {
describe('renders link and text', () => {
it('renders Review text', () => {
expect(wrapper.find(GlDeprecatedButton).text()).toBe('Review');
expect(wrapper.find(GlButton).text()).toBe('Review');
});
it('renders provided cssClass as class attribute', () => {
expect(wrapper.find(GlDeprecatedButton).attributes('class')).toEqual(
expect(wrapper.find(GlButton).attributes('class')).toEqual(
expect.stringContaining(propsData.cssClass),
);
});
......
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