diff options
-rw-r--r-- | app/assets/javascripts/clusters/components/application_row.vue | 8 | ||||
-rw-r--r-- | spec/frontend/clusters/components/application_row_spec.js | 26 |
2 files changed, 16 insertions, 18 deletions
diff --git a/app/assets/javascripts/clusters/components/application_row.vue b/app/assets/javascripts/clusters/components/application_row.vue index 0ffb5a2907a..4771090aa7e 100644 --- a/app/assets/javascripts/clusters/components/application_row.vue +++ b/app/assets/javascripts/clusters/components/application_row.vue @@ -328,7 +328,7 @@ export default { <div v-if="updateable"> <div v-if="shouldShowUpdateDetails" - class="form-text text-muted label p-0 js-cluster-application-upgrade-details" + class="form-text text-muted label p-0 js-cluster-application-update-details" > {{ versionLabel }} <span v-if="updateSuccessful">to</span> @@ -337,20 +337,20 @@ export default { v-if="updateSuccessful" :href="chartRepo" target="_blank" - class="js-cluster-application-upgrade-version" + class="js-cluster-application-update-version" >chart v{{ version }}</gl-link > </div> <div v-if="updateFailed && !isUpdating" - class="bs-callout bs-callout-danger cluster-application-banner mt-2 mb-0 js-cluster-application-upgrade-failure-message" + class="bs-callout bs-callout-danger cluster-application-banner mt-2 mb-0 js-cluster-application-update-details" > {{ updateFailureDescription }} </div> <loading-button v-if="updateAvailable || updateFailed || isUpdating" - class="btn btn-primary js-cluster-application-upgrade-button mt-2" + class="btn btn-primary js-cluster-application-update-button mt-2" :loading="isUpdating" :disabled="isUpdating" :label="updateButtonLabel" diff --git a/spec/frontend/clusters/components/application_row_spec.js b/spec/frontend/clusters/components/application_row_spec.js index 990080020ca..9f127ccb690 100644 --- a/spec/frontend/clusters/components/application_row_spec.js +++ b/spec/frontend/clusters/components/application_row_spec.js @@ -251,7 +251,7 @@ describe('Application Row', () => { ...DEFAULT_APPLICATION_STATE, status: null, }); - const updateBtn = vm.$el.querySelector('.js-cluster-application-upgrade-button'); + const updateBtn = vm.$el.querySelector('.js-cluster-application-update-button'); expect(updateBtn).toBe(null); }); @@ -261,7 +261,7 @@ describe('Application Row', () => { ...DEFAULT_APPLICATION_STATE, updateAvailable: true, }); - const updateBtn = vm.$el.querySelector('.js-cluster-application-upgrade-button'); + const updateBtn = vm.$el.querySelector('.js-cluster-application-update-button'); expect(updateBtn).not.toBe(null); expect(updateBtn.innerHTML).toContain('Update'); @@ -273,7 +273,7 @@ describe('Application Row', () => { status: APPLICATION_STATUS.INSTALLED, updateFailed: true, }); - const updateBtn = vm.$el.querySelector('.js-cluster-application-upgrade-button'); + const updateBtn = vm.$el.querySelector('.js-cluster-application-update-button'); expect(updateBtn).not.toBe(null); expect(updateBtn.innerHTML).toContain('Retry update'); @@ -284,7 +284,7 @@ describe('Application Row', () => { ...DEFAULT_APPLICATION_STATE, status: APPLICATION_STATUS.UPDATING, }); - const updateBtn = vm.$el.querySelector('.js-cluster-application-upgrade-button'); + const updateBtn = vm.$el.querySelector('.js-cluster-application-update-button'); expect(updateBtn).not.toBe(null); expect(vm.isUpdating).toBe(true); @@ -298,7 +298,7 @@ describe('Application Row', () => { status: APPLICATION_STATUS.INSTALLED, updateAvailable: true, }); - const updateBtn = vm.$el.querySelector('.js-cluster-application-upgrade-button'); + const updateBtn = vm.$el.querySelector('.js-cluster-application-update-button'); updateBtn.click(); @@ -314,7 +314,7 @@ describe('Application Row', () => { ...DEFAULT_APPLICATION_STATE, status: APPLICATION_STATUS.UPDATING, }); - const updateBtn = vm.$el.querySelector('.js-cluster-application-upgrade-button'); + const updateBtn = vm.$el.querySelector('.js-cluster-application-update-button'); updateBtn.click(); @@ -328,9 +328,7 @@ describe('Application Row', () => { status: APPLICATION_STATUS.INSTALLED, updateFailed: true, }); - const failureMessage = vm.$el.querySelector( - '.js-cluster-application-upgrade-failure-message', - ); + const failureMessage = vm.$el.querySelector('.js-cluster-application-update-details'); expect(failureMessage).not.toBe(null); expect(failureMessage.innerHTML).toContain( @@ -363,8 +361,8 @@ describe('Application Row', () => { updateSuccessful: true, version, }); - const updateDetails = vm.$el.querySelector('.js-cluster-application-upgrade-details'); - const versionEl = vm.$el.querySelector('.js-cluster-application-upgrade-version'); + const updateDetails = vm.$el.querySelector('.js-cluster-application-update-details'); + const versionEl = vm.$el.querySelector('.js-cluster-application-update-version'); expect(updateDetails.innerHTML).toContain('Updated'); expect(versionEl).not.toBe(null); @@ -381,7 +379,7 @@ describe('Application Row', () => { chartRepo, version, }); - const versionEl = vm.$el.querySelector('.js-cluster-application-upgrade-version'); + const versionEl = vm.$el.querySelector('.js-cluster-application-update-version'); expect(versionEl.href).toEqual(chartRepo); expect(versionEl.target).toEqual('_blank'); @@ -395,8 +393,8 @@ describe('Application Row', () => { updateFailed: true, version, }); - const updateDetails = vm.$el.querySelector('.js-cluster-application-upgrade-details'); - const versionEl = vm.$el.querySelector('.js-cluster-application-upgrade-version'); + const updateDetails = vm.$el.querySelector('.js-cluster-application-update-details'); + const versionEl = vm.$el.querySelector('.js-cluster-application-update-version'); expect(updateDetails.innerHTML).toContain('failed'); expect(versionEl).toBe(null); |