diff options
author | kushalpandya <kushal@gitlab.com> | 2017-05-09 17:00:22 +0300 |
---|---|---|
committer | kushalpandya <kushal@gitlab.com> | 2017-05-09 17:00:22 +0300 |
commit | f66006169bf94de749bfdcb9b57ca178f4bf6f68 (patch) | |
tree | 4f6bda983f92df7e940f5573b37171e6426b5fa9 /spec/javascripts/vue_mr_widget/components/mr_widget_deployment_spec.js | |
parent | 7ea12d8067357f8e846e26b05a1dc4ab3d5a5a93 (diff) |
Add Prometheus memory sparkline to MR widget
Diffstat (limited to 'spec/javascripts/vue_mr_widget/components/mr_widget_deployment_spec.js')
-rw-r--r-- | spec/javascripts/vue_mr_widget/components/mr_widget_deployment_spec.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_deployment_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_deployment_spec.js index 3d5f71babfb..2f971b39d16 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_deployment_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_deployment_spec.js @@ -9,6 +9,7 @@ const deploymentMockData = [ name: 'review/diplo', url: '/root/acets-review-apps/environments/15', stop_url: '/root/acets-review-apps/environments/15/stop', + metrics_url: '/root/acets-review-apps/environments/15/deployments/1/metrics', external_url: 'http://diplo.', external_url_formatted: 'diplo.', deployed_at: '2017-03-22T22:44:42.258Z', @@ -156,6 +157,7 @@ describe('MRWidgetDeployment', () => { expect(el.querySelector('.js-deploy-url').getAttribute('href')).toEqual(deployment.external_url); expect(el.querySelector('.js-deploy-url').innerText).toContain(deployment.external_url_formatted); expect(el.querySelector('.js-deploy-time').innerText).toContain(vm.formatDate(deployment.deployed_at)); + expect(el.querySelector('.js-mr-memory-usage')).toBeDefined(); expect(el.querySelector('button')).toBeDefined(); }); @@ -165,6 +167,7 @@ describe('MRWidgetDeployment', () => { Vue.nextTick(() => { expect(el.querySelectorAll('.ci-widget').length).toEqual(3); + expect(el.querySelectorAll('.js-mr-memory-usage').length).toEqual(3); done(); }); }); @@ -176,6 +179,7 @@ describe('MRWidgetDeployment', () => { expect(el.querySelectorAll('.js-deploy-meta').length).toEqual(0); expect(el.querySelectorAll('.js-deploy-url').length).toEqual(0); expect(el.querySelectorAll('.js-deploy-time').length).toEqual(0); + expect(el.querySelectorAll('.js-mr-memory-usage').length).toEqual(0); expect(el.querySelectorAll('.button').length).toEqual(0); done(); }); |