Merge branch '53578-fe-deployment-status' into 'master'

Adds missing status in deployment widget

See merge request gitlab-org/gitlab-ce!23239
This commit is contained in:
Phil Hughes 2018-11-21 11:49:31 +00:00
commit 685e14f888
4 changed files with 38 additions and 0 deletions

View file

@ -42,6 +42,8 @@ export default {
running: __('Deploying to'),
success: __('Deployed to'),
failed: __('Failed to deploy to'),
created: __('Will deploy to'),
canceled: __('Failed to deploy to'),
},
data() {
return {

View file

@ -0,0 +1,5 @@
---
title: Adds states to the deployment widget
merge_request:
author:
type: added

View file

@ -7245,6 +7245,9 @@ msgstr ""
msgid "Wiki|Wiki Pages"
msgstr ""
msgid "Will deploy to"
msgstr ""
msgid "Withdraw Access Request"
msgstr ""

View file

@ -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',
);
});
});
});
});