Commit b8dbebce authored by Filipa Lacerda's avatar Filipa Lacerda

Fix typo

parent f7d8c29e
...@@ -72,7 +72,7 @@ module.exports = Vue.component('environment-item', { ...@@ -72,7 +72,7 @@ module.exports = Vue.component('environment-item', {
* @returns {Boolean} * @returns {Boolean}
*/ */
hasLastDeploymentKey() { 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)) { !this.$options.isObjectEmpty(this.model.latest.last_deployment)) {
return true; return true;
} }
...@@ -86,7 +86,7 @@ module.exports = Vue.component('environment-item', { ...@@ -86,7 +86,7 @@ module.exports = Vue.component('environment-item', {
* @returns {Boolean|Undefined} * @returns {Boolean|Undefined}
*/ */
hasManualActions() { 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 &&
this.model.latest.last_deployment.manual_actions.length > 0; this.model.latest.last_deployment.manual_actions.length > 0;
}, },
...@@ -107,7 +107,7 @@ module.exports = Vue.component('environment-item', { ...@@ -107,7 +107,7 @@ module.exports = Vue.component('environment-item', {
* @returns {Boolean|Undefined} * @returns {Boolean|Undefined}
*/ */
canRetry() { canRetry() {
return this.model.lastest && return this.model.latest &&
this.hasLastDeploymentKey && this.hasLastDeploymentKey &&
this.model.latest.last_deployment && this.model.latest.last_deployment &&
this.model.latest.last_deployment.deployable; this.model.latest.last_deployment.deployable;
...@@ -119,7 +119,7 @@ module.exports = Vue.component('environment-item', { ...@@ -119,7 +119,7 @@ module.exports = Vue.component('environment-item', {
* @returns {Boolean|Undefined} * @returns {Boolean|Undefined}
*/ */
canShowDate() { canShowDate() {
return this.model.lastest && return this.model.latest &&
this.model.latest.last_deployment && this.model.latest.last_deployment &&
this.model.latest.last_deployment.deployable && this.model.latest.last_deployment.deployable &&
this.model.latest.last_deployment.deployable !== undefined; this.model.latest.last_deployment.deployable !== undefined;
...@@ -131,9 +131,9 @@ module.exports = Vue.component('environment-item', { ...@@ -131,9 +131,9 @@ module.exports = Vue.component('environment-item', {
* @returns {String} * @returns {String}
*/ */
createdDate() { createdDate() {
if (this.model.lastest && if (this.model.latest &&
this.model.latest.last_deployment && 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) { this.model.latest.last_deployment.deployable.created_at) {
return timeagoInstance.format(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', { ...@@ -350,7 +350,7 @@ module.exports = Vue.component('environment-item', {
*/ */
shouldRenderBuildName() { shouldRenderBuildName() {
return !this.model.isFolder && 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) &&
!this.$options.isObjectEmpty(this.model.latest.last_deployment.deployable); !this.$options.isObjectEmpty(this.model.latest.last_deployment.deployable);
}, },
...@@ -362,10 +362,10 @@ module.exports = Vue.component('environment-item', { ...@@ -362,10 +362,10 @@ module.exports = Vue.component('environment-item', {
*/ */
buildPath() { buildPath() {
if (this.model.latest && if (this.model.latest &&
this.model.lastest.last_deployment && this.model.latest.last_deployment &&
this.model.latest.last_deployment.deployable && this.model.latest.last_deployment.deployable &&
this.model.lastest.last_deployment.deployable.build_path) { this.model.latest.last_deployment.deployable.build_path) {
return this.model.lastest.last_deployment.deployable.build_path; return this.model.latest.last_deployment.deployable.build_path;
} }
return ''; return '';
...@@ -392,13 +392,13 @@ module.exports = Vue.component('environment-item', { ...@@ -392,13 +392,13 @@ module.exports = Vue.component('environment-item', {
*/ */
shouldRenderDeploymentID() { shouldRenderDeploymentID() {
return !this.model.isFolder && 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) &&
this.model.latest.last_deployment.iid !== undefined; this.model.latest.last_deployment.iid !== undefined;
}, },
environmentPath() { 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; return this.model.latest.environment_path;
} }
......
...@@ -271,7 +271,7 @@ feature 'Builds', :feature do ...@@ -271,7 +271,7 @@ feature 'Builds', :feature do
let!(:deployment) { create(:deployment, environment: environment, sha: project.commit.id) } let!(:deployment) { create(:deployment, environment: environment, sha: project.commit.id) }
let(:build) { create(:ci_build, :success, environment: environment.name, pipeline: pipeline) } 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) visit namespace_project_build_path(project.namespace, project, build)
expect(page).to have_link('latest deployment') expect(page).to have_link('latest deployment')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment