Commit e456c59d authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '219770-migrate-create-epic-buttons-in-epic-tree' into 'master'

Migrate deprecated create epic button in epic tree

Closes #219770

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