Commit 840e0aef authored by Dhiraj Bodicherla's avatar Dhiraj Bodicherla

Migrate Bootstrap button to GitLab UI GlButton

This MR migrates bootstrap button to
GitLab UI GlButton in mr_widget_failed_to_merge component
parent 4cd5f06b
<script>
import { GlButton } from '@gitlab/ui';
import { n__ } from '~/locale';
import { stripHtml } from '~/lib/utils/text_utility';
import statusIcon from '../mr_widget_status_icon.vue';
......@@ -8,6 +9,7 @@ export default {
name: 'MRWidgetFailedToMerge',
components: {
GlButton,
statusIcon,
},
......@@ -84,14 +86,14 @@ export default {
<span v-else> {{ s__('mrWidget|Merge failed.') }} </span>
<span :class="{ 'has-custom-error': mr.mergeError }"> {{ timerText }} </span>
</span>
<button
class="btn btn-default btn-sm js-refresh-button"
<gl-button
size="small"
data-testid="merge-request-failed-refresh-button"
data-qa-selector="merge_request_error_content"
type="button"
@click="refresh"
>
{{ s__('mrWidget|Refresh now') }}
</button>
</gl-button>
</div>
</template>
</div>
......
---
title: Migrate Bootstrap button to GitLab UI GlButton in mr_widget_failed_to_merge
merge_request: 40170
author:
type: other
......@@ -125,7 +125,11 @@ describe('MRWidgetFailedToMerge', () => {
});
it('renders refresh button', () => {
expect(vm.$el.querySelector('.js-refresh-button').textContent.trim()).toEqual('Refresh now');
expect(
vm.$el
.querySelector('[data-testid="merge-request-failed-refresh-button"]')
.textContent.trim(),
).toEqual('Refresh now');
});
it('renders remaining time', () => {
......
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