summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2019-08-07 15:37:03 +0000
committerKushal Pandya <kushalspandya@gmail.com>2019-08-07 15:37:03 +0000
commitaf2edf28259ff1c236af346cfa6c62092afe7391 (patch)
treeec03f00db414698204661a2883ede69ce5ccbca9
parente17350bec5ecbc7f1d64366c765263aa2a0452b9 (diff)
parent8bed16ee8458e287ccd30b4f9e01cc2b596b5929 (diff)
downloadgitlab-ce-af2edf28259ff1c236af346cfa6c62092afe7391.tar.gz
Merge branch '65705-two-buttons' into 'master'
Removes duplicate button from job log page Closes #65705 See merge request gitlab-org/gitlab-ce!31544
-rw-r--r--app/assets/javascripts/jobs/components/empty_state.vue2
-rw-r--r--changelogs/unreleased/65705-two-buttons.yml5
-rw-r--r--spec/javascripts/jobs/components/empty_state_spec.js (renamed from spec/frontend/jobs/components/empty_state_spec.js)8
3 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/jobs/components/empty_state.vue b/app/assets/javascripts/jobs/components/empty_state.vue
index 275ed80146e..e2bc413e3ce 100644
--- a/app/assets/javascripts/jobs/components/empty_state.vue
+++ b/app/assets/javascripts/jobs/components/empty_state.vue
@@ -81,7 +81,7 @@ export default {
:variables-settings-url="variablesSettingsUrl"
/>
<div class="text-content">
- <div v-if="action" class="text-center">
+ <div v-if="action && !shouldRenderManualVariables" class="text-center">
<gl-link
:href="action.path"
:data-method="action.method"
diff --git a/changelogs/unreleased/65705-two-buttons.yml b/changelogs/unreleased/65705-two-buttons.yml
new file mode 100644
index 00000000000..b92e28f9d68
--- /dev/null
+++ b/changelogs/unreleased/65705-two-buttons.yml
@@ -0,0 +1,5 @@
+---
+title: Prevent duplicated trigger action button
+merge_request:
+author:
+type: fixed
diff --git a/spec/frontend/jobs/components/empty_state_spec.js b/spec/javascripts/jobs/components/empty_state_spec.js
index dfba5a936ee..c6eac4e27b3 100644
--- a/spec/frontend/jobs/components/empty_state_spec.js
+++ b/spec/javascripts/jobs/components/empty_state_spec.js
@@ -105,7 +105,7 @@ describe('Empty State', () => {
});
describe('with playbale action and not scheduled job', () => {
- it('renders manual variables form', () => {
+ beforeEach(() => {
vm = mountComponent(Component, {
...props,
content,
@@ -117,9 +117,15 @@ describe('Empty State', () => {
method: 'post',
},
});
+ });
+ it('renders manual variables form', () => {
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', () => {