Commit f31957d0 authored by Alexis Ginsberg's avatar Alexis Ginsberg Committed by Jarek Ostrowski

Migrate deprecated create epic button in epic tree

parent a4b758de
<script>
import { mapState } from 'vuex';
import { GlDeprecatedButton, GlLoadingIcon } from '@gitlab/ui';
import { GlButton } from '@gitlab/ui';
import { __ } from '~/locale';
export default {
components: {
GlDeprecatedButton,
GlLoadingIcon,
GlButton,
},
props: {
isSubmitting: {
......@@ -62,18 +61,17 @@ export default {
@keyup.escape.exact="onFormCancel"
/>
<div class="add-issuable-form-actions clearfix">
<gl-deprecated-button
<gl-button
:disabled="isSubmitButtonDisabled"
:loading="isSubmitting"
variant="success"
category="primary"
type="submit"
class="float-left"
>
{{ buttonLabel }}
<gl-loading-icon v-if="isSubmitting" :inline="true" />
</gl-deprecated-button>
<gl-deprecated-button class="float-right" @click="onFormCancel">{{
__('Cancel')
}}</gl-deprecated-button>
</gl-button>
<gl-button class="float-right" @click="onFormCancel">{{ __('Cancel') }}</gl-button>
</div>
</form>
</template>
import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex';
import { GlDeprecatedButton } from '@gitlab/ui';
import { GlButton } from '@gitlab/ui';
import CreateEpicForm from 'ee/related_items_tree/components/create_epic_form.vue';
import createDefaultStore from 'ee/related_items_tree/store';
......@@ -106,7 +106,7 @@ describe('RelatedItemsTree', () => {
});
it('renders form action buttons', () => {
const actionButtons = wrapper.findAll(GlDeprecatedButton);
const actionButtons = wrapper.findAll(GlButton);
expect(actionButtons.at(0).text()).toBe('Create epic');
expect(actionButtons.at(1).text()).toBe('Cancel');
......
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