From 0c27de5f45aa1dc9841d10d348292324546685f2 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 7 Nov 2017 06:27:33 -0600 Subject: [PATCH] Update Cluster application install to be enabled when errored --- .../javascripts/clusters/components/application_row.vue | 2 +- spec/javascripts/clusters/components/application_row_spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/clusters/components/application_row.vue b/app/assets/javascripts/clusters/components/application_row.vue index b672111fda8..872abf03ef1 100644 --- a/app/assets/javascripts/clusters/components/application_row.vue +++ b/app/assets/javascripts/clusters/components/application_row.vue @@ -66,7 +66,7 @@ export default { // Avoid the potential for the real-time data to say APPLICATION_INSTALLABLE but // we already made a request to install and are just waiting for the real-time // to sync up. - return this.status !== APPLICATION_INSTALLABLE || + return (this.status !== APPLICATION_INSTALLABLE && this.status !== APPLICATION_ERROR) || this.requestStatus === REQUEST_LOADING || this.requestStatus === REQUEST_SUCCESS; }, diff --git a/spec/javascripts/clusters/components/application_row_spec.js b/spec/javascripts/clusters/components/application_row_spec.js index 392cebc5e35..e671c18e1a5 100644 --- a/spec/javascripts/clusters/components/application_row_spec.js +++ b/spec/javascripts/clusters/components/application_row_spec.js @@ -117,7 +117,7 @@ describe('Application Row', () => { expect(vm.installButtonDisabled).toEqual(true); }); - it('has disabled "Install" when APPLICATION_ERROR', () => { + it('has enabled "Install" when APPLICATION_ERROR', () => { vm = mountComponent(ApplicationRow, { ...DEFAULT_APPLICATION_STATE, status: APPLICATION_ERROR, @@ -125,7 +125,7 @@ describe('Application Row', () => { expect(vm.installButtonLabel).toEqual('Install'); expect(vm.installButtonLoading).toEqual(false); - expect(vm.installButtonDisabled).toEqual(true); + expect(vm.installButtonDisabled).toEqual(false); }); it('has loading "Install" when REQUEST_LOADING', () => {