Commit 8bed16ee authored by Filipa Lacerda's avatar Filipa Lacerda

Removes duplicate button

Prevents manual action button from being rendered
twice in the job log empty state
parent 4aa824e7
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
:variables-settings-url="variablesSettingsUrl" :variables-settings-url="variablesSettingsUrl"
/> />
<div class="text-content"> <div class="text-content">
<div v-if="action" class="text-center"> <div v-if="action && !shouldRenderManualVariables" class="text-center">
<gl-link <gl-link
:href="action.path" :href="action.path"
:data-method="action.method" :data-method="action.method"
......
---
title: Prevent duplicated trigger action button
merge_request:
author:
type: fixed
...@@ -105,7 +105,7 @@ describe('Empty State', () => { ...@@ -105,7 +105,7 @@ describe('Empty State', () => {
}); });
describe('with playbale action and not scheduled job', () => { describe('with playbale action and not scheduled job', () => {
it('renders manual variables form', () => { beforeEach(() => {
vm = mountComponent(Component, { vm = mountComponent(Component, {
...props, ...props,
content, content,
...@@ -117,9 +117,15 @@ describe('Empty State', () => { ...@@ -117,9 +117,15 @@ describe('Empty State', () => {
method: 'post', method: 'post',
}, },
}); });
});
it('renders manual variables form', () => {
expect(vm.$el.querySelector('.js-manual-vars-form')).not.toBeNull(); expect(vm.$el.querySelector('.js-manual-vars-form')).not.toBeNull();
}); });
it('does not render the empty state action', () => {
expect(vm.$el.querySelector('.js-job-empty-state-action')).toBeNull();
});
}); });
describe('with playbale action and scheduled job', () => { describe('with playbale action and scheduled job', () => {
......
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