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> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { escape } from 'lodash'; import { escape } from 'lodash';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
}, },
props: { props: {
changesEmptyStateIllustration: { changesEmptyStateIllustration: {
...@@ -43,9 +43,9 @@ export default { ...@@ -43,9 +43,9 @@ export default {
<div class="text-content text-center"> <div class="text-content text-center">
<span v-html="emptyStateText"></span> <span v-html="emptyStateText"></span>
<div class="text-center"> <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') __('Create commit')
}}</gl-deprecated-button> }}</gl-button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -2,6 +2,7 @@ import { createLocalVue, shallowMount } from '@vue/test-utils'; ...@@ -2,6 +2,7 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { createStore } from '~/mr_notes/stores'; import { createStore } from '~/mr_notes/stores';
import NoChanges from '~/diffs/components/no_changes.vue'; import NoChanges from '~/diffs/components/no_changes.vue';
import { GlButton } from '@gitlab/ui';
describe('Diff no changes empty state', () => { describe('Diff no changes empty state', () => {
let vm; let vm;
...@@ -37,4 +38,11 @@ describe('Diff no changes empty state', () => { ...@@ -37,4 +38,11 @@ describe('Diff no changes empty state', () => {
expect(vm.contains('script')).toBe(false); 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