Commit 3d9b5f1f authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'marcel-update-deprecated-button-5' into 'master'

Update to glbutton in manual job variables form

Closes #219799

See merge request gitlab-org/gitlab!39311
parents 17fb1b4d f7c1db12
<script> <script>
import { uniqueId } from 'lodash'; import { uniqueId } from 'lodash';
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
export default { export default {
name: 'ManualVariablesForm', name: 'ManualVariablesForm',
components: { components: {
GlDeprecatedButton, GlButton,
GlIcon,
}, },
props: { props: {
action: { action: {
...@@ -136,12 +135,12 @@ export default { ...@@ -136,12 +135,12 @@ export default {
<div class="table-section section-10"> <div class="table-section section-10">
<div class="table-mobile-header" role="rowheader"></div> <div class="table-mobile-header" role="rowheader"></div>
<div class="table-mobile-content justify-content-end"> <div class="table-mobile-content justify-content-end">
<gl-deprecated-button <gl-button
class="btn-transparent btn-blank w-25" category="tertiary"
icon="clear"
:aria-label="__('Delete variable')"
@click="deleteVariable(variable.id)" @click="deleteVariable(variable.id)"
> />
<gl-icon name="clear" />
</gl-deprecated-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -175,9 +174,14 @@ export default { ...@@ -175,9 +174,14 @@ export default {
<p class="text-muted" v-html="helpText"></p> <p class="text-muted" v-html="helpText"></p>
</div> </div>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
<gl-deprecated-button variant="primary" @click="triggerManualJob(variables)"> <gl-button
variant="info"
category="primary"
:aria-label="__('Trigger manual job')"
@click="triggerManualJob(variables)"
>
{{ action.button_title }} {{ action.button_title }}
</gl-deprecated-button> </gl-button>
</div> </div>
</div> </div>
</template> </template>
---
title: Update spec to glbutton
merge_request: 39311
author:
type: other
...@@ -26049,6 +26049,9 @@ msgstr "" ...@@ -26049,6 +26049,9 @@ msgstr ""
msgid "Trigger cluster reindexing" msgid "Trigger cluster reindexing"
msgstr "" msgstr ""
msgid "Trigger manual job"
msgstr ""
msgid "Trigger pipelines for mirror updates" msgid "Trigger pipelines for mirror updates"
msgstr "" msgstr ""
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount, createLocalVue } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import Form from '~/jobs/components/manual_variables_form.vue'; import Form from '~/jobs/components/manual_variables_form.vue';
const localVue = createLocalVue(); const localVue = createLocalVue();
...@@ -95,7 +95,7 @@ describe('Manual Variables Form', () => { ...@@ -95,7 +95,7 @@ describe('Manual Variables Form', () => {
}); });
it('removes the variable row', () => { it('removes the variable row', () => {
wrapper.find(GlDeprecatedButton).vm.$emit('click'); wrapper.find(GlButton).vm.$emit('click');
expect(wrapper.vm.variables.length).toBe(0); expect(wrapper.vm.variables.length).toBe(0);
}); });
......
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