Commit 9acd9885 authored by Jeremy Elder's avatar Jeremy Elder Committed by Kushal Pandya

Replace GlDeprecatedButton with GlButton in requirement_form.vue

parent 7f9af793
<script> <script>
import { GlDrawer, GlFormGroup, GlFormTextarea, GlDeprecatedButton } from '@gitlab/ui'; import { GlDrawer, GlFormGroup, GlFormTextarea, GlButton } from '@gitlab/ui';
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
...@@ -13,7 +13,7 @@ export default { ...@@ -13,7 +13,7 @@ export default {
GlDrawer, GlDrawer,
GlFormGroup, GlFormGroup,
GlFormTextarea, GlFormTextarea,
GlDeprecatedButton, GlButton,
}, },
props: { props: {
drawerOpen: { drawerOpen: {
...@@ -117,18 +117,24 @@ export default { ...@@ -117,18 +117,24 @@ export default {
/> />
</gl-form-group> </gl-form-group>
<div class="d-flex requirement-form-actions"> <div class="d-flex requirement-form-actions">
<gl-deprecated-button <gl-button
:disabled="disableSaveButton" :disabled="disableSaveButton"
:loading="requirementRequestActive" :loading="requirementRequestActive"
category="primary"
variant="success" variant="success"
category="primary"
class="mr-auto js-requirement-save" class="mr-auto js-requirement-save"
@click="handleSave" @click="handleSave"
>{{ saveButtonLabel }}</gl-deprecated-button
> >
<gl-deprecated-button class="js-requirement-cancel" @click="$emit('cancel')"> {{ saveButtonLabel }}
</gl-button>
<gl-button
variant="default"
category="primary"
class="js-requirement-cancel"
@click="$emit('cancel')"
>
{{ __('Cancel') }} {{ __('Cancel') }}
</gl-deprecated-button> </gl-button>
</div> </div>
</div> </div>
</div> </div>
......
---
title: Replace GlDeprecatedButton with GlButton in Requirements form
merge_request: 38422
author:
type: other
...@@ -157,7 +157,7 @@ RSpec.describe 'Requirements list', :js do ...@@ -157,7 +157,7 @@ RSpec.describe 'Requirements list', :js do
end end
page.within('.requirement-form') do page.within('.requirement-form') do
expect(page.find('span')).to have_content("REQ-#{requirement1.iid}") expect(page.find('span', match: :first)).to have_content("REQ-#{requirement1.iid}")
expect(page.find('textarea#requirementTitle')['value']).to have_content("#{requirement1.title}") expect(page.find('textarea#requirementTitle')['value']).to have_content("#{requirement1.title}")
expect(page.find('.js-requirement-save')).to have_content('Save changes') expect(page.find('.js-requirement-save')).to have_content('Save changes')
end end
......
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