Commit febc473f authored by Filipa Lacerda's avatar Filipa Lacerda

Adds missing status in deployment widget

Renders created and canceled status in MR widget
parent 2ea250d4
...@@ -42,6 +42,8 @@ export default { ...@@ -42,6 +42,8 @@ export default {
running: __('Deploying to'), running: __('Deploying to'),
success: __('Deployed to'), success: __('Deployed to'),
failed: __('Failed to deploy to'), failed: __('Failed to deploy to'),
created: __('Will deploy to'),
canceled: __('Failed to deploy to'),
}, },
data() { data() {
return { return {
......
---
title: Adds states to the deployment widget
merge_request:
author:
type: added
...@@ -7191,6 +7191,9 @@ msgstr "" ...@@ -7191,6 +7191,9 @@ msgstr ""
msgid "Wiki|Wiki Pages" msgid "Wiki|Wiki Pages"
msgstr "" msgstr ""
msgid "Will deploy to"
msgstr ""
msgid "Withdraw Access Request" msgid "Withdraw Access Request"
msgstr "" msgstr ""
......
...@@ -252,5 +252,33 @@ describe('Deployment component', () => { ...@@ -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',
);
});
});
}); });
}); });
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