Commit 69b34501 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch '219891-replace-gl-deprecated-button' into 'master'

Migrate `GlDeprecatedButton` to `GlButton`

See merge request gitlab-org/gitlab!34323
parents 60b7c3bc a0ad47b7
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { import {
GlDeprecatedButton, GlButton,
GlFormInput, GlFormInput,
GlLink, GlLink,
GlLoadingIcon, GlLoadingIcon,
...@@ -33,7 +33,7 @@ const SENTRY_TIMEOUT = 10000; ...@@ -33,7 +33,7 @@ const SENTRY_TIMEOUT = 10000;
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
GlFormInput, GlFormInput,
GlLink, GlLink,
GlLoadingIcon, GlLoadingIcon,
...@@ -279,22 +279,24 @@ export default { ...@@ -279,22 +279,24 @@ export default {
</div> </div>
<div class="error-details-actions"> <div class="error-details-actions">
<div class="d-inline-flex bv-d-sm-down-none"> <div class="d-inline-flex bv-d-sm-down-none">
<gl-deprecated-button <gl-button
:loading="updatingIgnoreStatus" :loading="updatingIgnoreStatus"
data-testid="update-ignore-status-btn" data-testid="update-ignore-status-btn"
@click="onIgnoreStatusUpdate" @click="onIgnoreStatusUpdate"
> >
{{ ignoreBtnLabel }} {{ ignoreBtnLabel }}
</gl-deprecated-button> </gl-button>
<gl-deprecated-button <gl-button
class="btn-outline-info ml-2" class="ml-2"
category="secondary"
variant="info"
:loading="updatingResolveStatus" :loading="updatingResolveStatus"
data-testid="update-resolve-status-btn" data-testid="update-resolve-status-btn"
@click="onResolveStatusUpdate" @click="onResolveStatusUpdate"
> >
{{ resolveBtnLabel }} {{ resolveBtnLabel }}
</gl-deprecated-button> </gl-button>
<gl-deprecated-button <gl-button
v-if="error.gitlabIssuePath" v-if="error.gitlabIssuePath"
class="ml-2" class="ml-2"
data-testid="view_issue_button" data-testid="view_issue_button"
...@@ -302,7 +304,7 @@ export default { ...@@ -302,7 +304,7 @@ export default {
variant="success" variant="success"
> >
{{ __('View issue') }} {{ __('View issue') }}
</gl-deprecated-button> </gl-button>
<form <form
ref="sentryIssueForm" ref="sentryIssueForm"
:action="projectIssuesPath" :action="projectIssuesPath"
...@@ -317,15 +319,16 @@ export default { ...@@ -317,15 +319,16 @@ export default {
name="issue[sentry_issue_attributes][sentry_issue_identifier]" name="issue[sentry_issue_attributes][sentry_issue_identifier]"
/> />
<gl-form-input :value="csrfToken" class="hidden" name="authenticity_token" /> <gl-form-input :value="csrfToken" class="hidden" name="authenticity_token" />
<gl-deprecated-button <gl-button
v-if="!error.gitlabIssuePath" v-if="!error.gitlabIssuePath"
class="btn-success" category="primary"
variant="success"
:loading="issueCreationInProgress" :loading="issueCreationInProgress"
data-qa-selector="create_issue_button" data-qa-selector="create_issue_button"
@click="createIssue" @click="createIssue"
> >
{{ __('Create issue') }} {{ __('Create issue') }}
</gl-deprecated-button> </gl-button>
</form> </form>
</div> </div>
<gl-dropdown <gl-dropdown
......
...@@ -3,7 +3,7 @@ import Vuex from 'vuex'; ...@@ -3,7 +3,7 @@ import Vuex from 'vuex';
import { __ } from '~/locale'; import { __ } from '~/locale';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { import {
GlDeprecatedButton, GlButton,
GlLoadingIcon, GlLoadingIcon,
GlLink, GlLink,
GlBadge, GlBadge,
...@@ -52,7 +52,7 @@ describe('ErrorDetails', () => { ...@@ -52,7 +52,7 @@ describe('ErrorDetails', () => {
function mountComponent() { function mountComponent() {
wrapper = shallowMount(ErrorDetails, { wrapper = shallowMount(ErrorDetails, {
stubs: { GlDeprecatedButton, GlSprintf }, stubs: { GlButton, GlSprintf },
localVue, localVue,
store, store,
mocks, mocks,
...@@ -195,7 +195,7 @@ describe('ErrorDetails', () => { ...@@ -195,7 +195,7 @@ describe('ErrorDetails', () => {
expect(wrapper.find(GlLoadingIcon).exists()).toBe(true); expect(wrapper.find(GlLoadingIcon).exists()).toBe(true);
expect(wrapper.find(Stacktrace).exists()).toBe(false); expect(wrapper.find(Stacktrace).exists()).toBe(false);
expect(wrapper.find(GlBadge).exists()).toBe(false); expect(wrapper.find(GlBadge).exists()).toBe(false);
expect(wrapper.findAll(GlDeprecatedButton).length).toBe(3); expect(wrapper.findAll(GlButton)).toHaveLength(3);
}); });
describe('unsafe chars for culprit field', () => { describe('unsafe chars for culprit field', () => {
......
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