diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-02-12 13:43:46 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-02-12 13:43:46 +0000 |
commit | b8dbebce1d7e0ad4edf2ab09135457ade69c240c (patch) | |
tree | 9045e76918ed5ac166cbb036facae7405342fc7b | |
parent | f7d8c29e71dc3a5aed4cf7252beaee6fe634de6b (diff) | |
download | gitlab-ce-b8dbebce1d7e0ad4edf2ab09135457ade69c240c.tar.gz |
Fix typo
-rw-r--r-- | app/assets/javascripts/environments/components/environment_item.js.es6 | 24 | ||||
-rw-r--r-- | spec/features/projects/builds_spec.rb | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/app/assets/javascripts/environments/components/environment_item.js.es6 b/app/assets/javascripts/environments/components/environment_item.js.es6 index 391539232b1..7805152b173 100644 --- a/app/assets/javascripts/environments/components/environment_item.js.es6 +++ b/app/assets/javascripts/environments/components/environment_item.js.es6 @@ -72,7 +72,7 @@ module.exports = Vue.component('environment-item', { * @returns {Boolean} */ hasLastDeploymentKey() { - if (this.model.lastest && this.model.latest.last_deployment && + if (this.model.latest && this.model.latest.last_deployment && !this.$options.isObjectEmpty(this.model.latest.last_deployment)) { return true; } @@ -86,7 +86,7 @@ module.exports = Vue.component('environment-item', { * @returns {Boolean|Undefined} */ hasManualActions() { - return this.model.lastest && this.model.latest.last_deployment && + return this.model.latest && this.model.latest.last_deployment && this.model.latest.last_deployment.manual_actions && this.model.latest.last_deployment.manual_actions.length > 0; }, @@ -107,7 +107,7 @@ module.exports = Vue.component('environment-item', { * @returns {Boolean|Undefined} */ canRetry() { - return this.model.lastest && + return this.model.latest && this.hasLastDeploymentKey && this.model.latest.last_deployment && this.model.latest.last_deployment.deployable; @@ -119,7 +119,7 @@ module.exports = Vue.component('environment-item', { * @returns {Boolean|Undefined} */ canShowDate() { - return this.model.lastest && + return this.model.latest && this.model.latest.last_deployment && this.model.latest.last_deployment.deployable && this.model.latest.last_deployment.deployable !== undefined; @@ -131,9 +131,9 @@ module.exports = Vue.component('environment-item', { * @returns {String} */ createdDate() { - if (this.model.lastest && + if (this.model.latest && this.model.latest.last_deployment && - this.model.lastest.last_deployment.deployable && + this.model.latest.last_deployment.deployable && this.model.latest.last_deployment.deployable.created_at) { return timeagoInstance.format(this.model.latest.last_deployment.deployable.created_at); } @@ -350,7 +350,7 @@ module.exports = Vue.component('environment-item', { */ shouldRenderBuildName() { return !this.model.isFolder && - this.model.lastest && + this.model.latest && !this.$options.isObjectEmpty(this.model.latest.last_deployment) && !this.$options.isObjectEmpty(this.model.latest.last_deployment.deployable); }, @@ -362,10 +362,10 @@ module.exports = Vue.component('environment-item', { */ buildPath() { if (this.model.latest && - this.model.lastest.last_deployment && + this.model.latest.last_deployment && this.model.latest.last_deployment.deployable && - this.model.lastest.last_deployment.deployable.build_path) { - return this.model.lastest.last_deployment.deployable.build_path; + this.model.latest.last_deployment.deployable.build_path) { + return this.model.latest.last_deployment.deployable.build_path; } return ''; @@ -392,13 +392,13 @@ module.exports = Vue.component('environment-item', { */ shouldRenderDeploymentID() { return !this.model.isFolder && - this.model.lastest && + this.model.latest && !this.$options.isObjectEmpty(this.model.latest.last_deployment) && this.model.latest.last_deployment.iid !== undefined; }, environmentPath() { - if (this.model && this.model.lastest && this.model.latest.environment_path) { + if (this.model && this.model.latest && this.model.latest.environment_path) { return this.model.latest.environment_path; } diff --git a/spec/features/projects/builds_spec.rb b/spec/features/projects/builds_spec.rb index f7e0115643e..80ba5ff1a63 100644 --- a/spec/features/projects/builds_spec.rb +++ b/spec/features/projects/builds_spec.rb @@ -271,7 +271,7 @@ feature 'Builds', :feature do let!(:deployment) { create(:deployment, environment: environment, sha: project.commit.id) } let(:build) { create(:ci_build, :success, environment: environment.name, pipeline: pipeline) } - it 'shows a link to lastest deployment' do + it 'shows a link to latest deployment' do visit namespace_project_build_path(project.namespace, project, build) expect(page).to have_link('latest deployment') |