Commit f86786ed authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch...

Merge branch '219906-replace-gl-deprecated-button-with-gl-button-in-app-assets-javascripts-diffs-components' into 'master'

Resolve "Replace <gl-deprecated-button> with <gl-button> in app/assets/javascripts/diffs/components/no_changes.vue"

Closes #219906

See merge request gitlab-org/gitlab!36566
parents b03b414c fd85c4aa
<script>
import { mapGetters } from 'vuex';
import { escape } from 'lodash';
import { GlDeprecatedButton } from '@gitlab/ui';
import { GlButton } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
export default {
components: {
GlDeprecatedButton,
GlButton,
},
props: {
changesEmptyStateIllustration: {
......@@ -43,9 +43,9 @@ export default {
<div class="text-content text-center">
<span v-html="emptyStateText"></span>
<div class="text-center">
<gl-deprecated-button :href="getNoteableData.new_blob_path" variant="success">{{
<gl-button :href="getNoteableData.new_blob_path" variant="success" category="primary">{{
__('Create commit')
}}</gl-deprecated-button>
}}</gl-button>
</div>
</div>
</div>
......
......@@ -2,6 +2,7 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex';
import { createStore } from '~/mr_notes/stores';
import NoChanges from '~/diffs/components/no_changes.vue';
import { GlButton } from '@gitlab/ui';
describe('Diff no changes empty state', () => {
let vm;
......@@ -37,4 +38,11 @@ describe('Diff no changes empty state', () => {
expect(vm.contains('script')).toBe(false);
});
describe('Renders', () => {
it('Show create commit button', () => {
createComponent();
expect(vm.find(GlButton).exists()).toBe(true);
});
});
});
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