Commit 07796207 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch...

Merge branch '219863-replace-gl-deprecated-button-with-gl-button-in-ee-app-assets-javascripts-requirements-2' into 'master'

Replace GlDeprecatedButton with GlButton in requirement_form.vue

Closes #219863

See merge request gitlab-org/gitlab!38422
parents e083e5cb 9acd9885
<script>
import { GlDrawer, GlFormGroup, GlFormTextarea, GlDeprecatedButton } from '@gitlab/ui';
import { GlDrawer, GlFormGroup, GlFormTextarea, GlButton } from '@gitlab/ui';
import { isEmpty } from 'lodash';
import { __, sprintf } from '~/locale';
......@@ -13,7 +13,7 @@ export default {
GlDrawer,
GlFormGroup,
GlFormTextarea,
GlDeprecatedButton,
GlButton,
},
props: {
drawerOpen: {
......@@ -117,18 +117,24 @@ export default {
/>
</gl-form-group>
<div class="d-flex requirement-form-actions">
<gl-deprecated-button
<gl-button
:disabled="disableSaveButton"
:loading="requirementRequestActive"
category="primary"
variant="success"
category="primary"
class="mr-auto js-requirement-save"
@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') }}
</gl-deprecated-button>
</gl-button>
</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
end
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('.js-requirement-save')).to have_content('Save changes')
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