diff options
| author | Phil Hughes <me@iamphill.com> | 2018-11-21 11:49:31 +0000 |
|---|---|---|
| committer | Phil Hughes <me@iamphill.com> | 2018-11-21 11:49:31 +0000 |
| commit | 685e14f8887ef8f26fd15e935d377b2c806b6c38 (patch) | |
| tree | faff43575153743bdd42cbc3683384f30c2743fa /spec/javascripts | |
| parent | b8dd1425841521bffbe0f937565b9d60e9182be0 (diff) | |
| parent | febc473f541b2c82ec811b1540b2a7ceec8131ca (diff) | |
| download | gitlab-ce-685e14f8887ef8f26fd15e935d377b2c806b6c38.tar.gz | |
Merge branch '53578-fe-deployment-status' into 'master'
Adds missing status in deployment widget
See merge request gitlab-org/gitlab-ce!23239
Diffstat (limited to 'spec/javascripts')
| -rw-r--r-- | spec/javascripts/vue_mr_widget/components/deployment_spec.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/javascripts/vue_mr_widget/components/deployment_spec.js b/spec/javascripts/vue_mr_widget/components/deployment_spec.js index 056b4df8fdc..e355416bd27 100644 --- a/spec/javascripts/vue_mr_widget/components/deployment_spec.js +++ b/spec/javascripts/vue_mr_widget/components/deployment_spec.js @@ -252,5 +252,33 @@ describe('Deployment component', () => { ); }); }); + + describe('created', () => { + beforeEach(() => { + vm = mountComponent(Component, { + deployment: Object.assign({}, deploymentMockData, { status: 'created' }), + showMetrics: true, + }); + }); + + it('renders information about created deployment', () => { + expect(vm.$el.querySelector('.js-deployment-info').textContent).toContain('Will deploy to'); + }); + }); + + describe('canceled', () => { + beforeEach(() => { + vm = mountComponent(Component, { + deployment: Object.assign({}, deploymentMockData, { status: 'canceled' }), + showMetrics: true, + }); + }); + + it('renders information about canceled deployment', () => { + expect(vm.$el.querySelector('.js-deployment-info').textContent).toContain( + 'Failed to deploy to', + ); + }); + }); }); }); |
