summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-11-15 15:45:04 +0000
committerPhil Hughes <me@iamphill.com>2018-11-15 15:45:04 +0000
commit6c51a6df40d9bc1cb48c7352de5393b787f11d13 (patch)
treef057351381d380532f795c21b9896d12fd390988
parent84db49ea0c6d18a12efa7268e06d9611ca267fd7 (diff)
parentf2479e1987304fc7064de4b1f5e72320f958edd7 (diff)
downloadgitlab-ce-6c51a6df40d9bc1cb48c7352de5393b787f11d13.tar.gz
Merge branch '54021-empty-button' into 'master'
Prevents empty button in jobs empty state Closes #54021 See merge request gitlab-org/gitlab-ce!23072
-rw-r--r--app/assets/javascripts/jobs/store/getters.js2
-rw-r--r--changelogs/unreleased/54021-empty-button.yml5
-rw-r--r--spec/javascripts/jobs/components/empty_state_spec.js1
3 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/jobs/store/getters.js b/app/assets/javascripts/jobs/store/getters.js
index d440b2c9ef1..35e92b0b5d9 100644
--- a/app/assets/javascripts/jobs/store/getters.js
+++ b/app/assets/javascripts/jobs/store/getters.js
@@ -42,7 +42,7 @@ export const emptyStateIllustration = state =>
(state.job && state.job.status && state.job.status.illustration) || {};
export const emptyStateAction = state =>
- (state.job && state.job.status && state.job.status.action) || {};
+ (state.job && state.job.status && state.job.status.action) || null;
export const isScrollingDown = state => isScrolledToBottom() && !state.isTraceComplete;
diff --git a/changelogs/unreleased/54021-empty-button.yml b/changelogs/unreleased/54021-empty-button.yml
new file mode 100644
index 00000000000..3b03665cf95
--- /dev/null
+++ b/changelogs/unreleased/54021-empty-button.yml
@@ -0,0 +1,5 @@
+---
+title: Prevent empty button being rendered in empty state
+merge_request:
+author:
+type: fixed
diff --git a/spec/javascripts/jobs/components/empty_state_spec.js b/spec/javascripts/jobs/components/empty_state_spec.js
index 0a39709221c..a2df79bdda0 100644
--- a/spec/javascripts/jobs/components/empty_state_spec.js
+++ b/spec/javascripts/jobs/components/empty_state_spec.js
@@ -84,6 +84,7 @@ describe('Empty State', () => {
vm = mountComponent(Component, {
...props,
content,
+ action: null,
});
expect(vm.$el.querySelector('.js-job-empty-state-action')).toBeNull();