diff options
author | jakeburden <jburden@gitlab.com> | 2019-08-21 14:58:04 -0400 |
---|---|---|
committer | jakeburden <jburden@gitlab.com> | 2019-08-28 08:48:14 -0400 |
commit | a3edfab1a9fcfdab56d2f2d29fa9f72ce0455ee4 (patch) | |
tree | d3eb7bbe85a789d72e2cb2296431ac0130f5be41 /spec/javascripts/environments | |
parent | ef0f1509dd2a2a3ba5798362e2be21108b705a85 (diff) | |
download | gitlab-ce-a3edfab1a9fcfdab56d2f2d29fa9f72ce0455ee4.tar.gz |
Show correct deployment date for a manual job56130-operations-environments-shows-incorrect-deployment-date-for-manual-deploy-jobs
Only display time if the job has deployed
Update JS tests for displaying job deployment time
Simplify boolean check in deployedDate
Diffstat (limited to 'spec/javascripts/environments')
-rw-r--r-- | spec/javascripts/environments/environment_item_spec.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/javascripts/environments/environment_item_spec.js b/spec/javascripts/environments/environment_item_spec.js index 388d7063d13..f9ee4648128 100644 --- a/spec/javascripts/environments/environment_item_spec.js +++ b/spec/javascripts/environments/environment_item_spec.js @@ -106,6 +106,7 @@ describe('Environment item', () => { play_path: '/play', }, ], + deployed_at: '2016-11-29T18:11:58.430Z', }, has_stop_action: true, environment_path: 'root/ci-folders/environments/31', @@ -139,9 +140,7 @@ describe('Environment item', () => { it('should render last deployment date', () => { const timeagoInstance = new timeago(); // eslint-disable-line - const formatedDate = timeagoInstance.format( - environment.last_deployment.deployable.created_at, - ); + const formatedDate = timeagoInstance.format(environment.last_deployment.deployed_at); expect( component.$el.querySelector('.environment-created-date-timeago').textContent, |