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> <script>
import { import {
GlDeprecatedButton, GlButton,
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlModal, GlModal,
...@@ -14,7 +14,7 @@ import { s__, sprintf } from '~/locale'; ...@@ -14,7 +14,7 @@ import { s__, sprintf } from '~/locale';
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlModal, GlModal,
...@@ -155,14 +155,16 @@ export default { ...@@ -155,14 +155,16 @@ export default {
</script> </script>
<template> <template>
<div class="inline"> <div class="inline">
<gl-deprecated-button <gl-button
v-gl-modal="modalId" 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" :class="cssClass"
type="button" type="button"
> >
{{ s__('VisualReviewApp|Review') }} {{ s__('VisualReviewApp|Review') }}
</gl-deprecated-button> </gl-button>
<gl-modal <gl-modal
ref="modal" ref="modal"
:modal-id="modalId" :modal-id="modalId"
...@@ -198,9 +200,9 @@ export default { ...@@ -198,9 +200,9 @@ export default {
</p> </p>
<p v-html="instructionText.step4"></p> <p v-html="instructionText.step4"></p>
<template #modal-footer> <template #modal-footer>
<gl-deprecated-button @click="cancel"> <gl-button category="secondary" @click="cancel">
{{ s__('VisualReviewApp|Cancel') }} {{ s__('VisualReviewApp|Cancel') }}
</gl-deprecated-button> </gl-button>
<gl-deprecated-dropdown <gl-deprecated-dropdown
v-if="shouldShowChanges" v-if="shouldShowChanges"
dropup dropup
......
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import VisualReviewAppLink from 'ee/vue_merge_request_widget/components/visual_review_app_link.vue'; 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 { mockTracking, triggerEvent } from 'helpers/tracking_helper';
import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue'; import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue';
...@@ -46,11 +46,11 @@ describe('Visual Review App Link', () => { ...@@ -46,11 +46,11 @@ describe('Visual Review App Link', () => {
describe('renders link and text', () => { describe('renders link and text', () => {
it('renders Review 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', () => { 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), 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