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> <script>
import { GlButton } from '@gitlab/ui';
import { n__ } from '~/locale'; import { n__ } from '~/locale';
import { stripHtml } from '~/lib/utils/text_utility'; import { stripHtml } from '~/lib/utils/text_utility';
import statusIcon from '../mr_widget_status_icon.vue'; import statusIcon from '../mr_widget_status_icon.vue';
...@@ -8,6 +9,7 @@ export default { ...@@ -8,6 +9,7 @@ export default {
name: 'MRWidgetFailedToMerge', name: 'MRWidgetFailedToMerge',
components: { components: {
GlButton,
statusIcon, statusIcon,
}, },
...@@ -84,14 +86,14 @@ export default { ...@@ -84,14 +86,14 @@ export default {
<span v-else> {{ s__('mrWidget|Merge failed.') }} </span> <span v-else> {{ s__('mrWidget|Merge failed.') }} </span>
<span :class="{ 'has-custom-error': mr.mergeError }"> {{ timerText }} </span> <span :class="{ 'has-custom-error': mr.mergeError }"> {{ timerText }} </span>
</span> </span>
<button <gl-button
class="btn btn-default btn-sm js-refresh-button" size="small"
data-testid="merge-request-failed-refresh-button"
data-qa-selector="merge_request_error_content" data-qa-selector="merge_request_error_content"
type="button"
@click="refresh" @click="refresh"
> >
{{ s__('mrWidget|Refresh now') }} {{ s__('mrWidget|Refresh now') }}
</button> </gl-button>
</div> </div>
</template> </template>
</div> </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', () => { ...@@ -125,7 +125,11 @@ describe('MRWidgetFailedToMerge', () => {
}); });
it('renders refresh button', () => { 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', () => { 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