Commit ae5ef47e authored by lauraMon's avatar lauraMon

Removes mock data, adds spec and translation

parent 6c9312cd
...@@ -6,7 +6,7 @@ export default { ...@@ -6,7 +6,7 @@ export default {
statuses: { statuses: {
triggered: s__('AlertManagement|Triggered'), triggered: s__('AlertManagement|Triggered'),
acknowledged: s__('AlertManagement|Acknowledged'), acknowledged: s__('AlertManagement|Acknowledged'),
ignored: s__('AlertManagement|Ignored'), resolved: s__('AlertManagement|Resolved'),
}, },
i18n: { i18n: {
fullAlertDetailsTitle: s__('AlertManagement|Full Alert Details'), fullAlertDetailsTitle: s__('AlertManagement|Full Alert Details'),
...@@ -27,6 +27,7 @@ export default { ...@@ -27,6 +27,7 @@ export default {
<gl-new-dropdown-item <gl-new-dropdown-item
v-for="(label, field) in $options.statuses" v-for="(label, field) in $options.statuses"
:key="field" :key="field"
data-testid="statusDropdownItem"
class="align-middle" class="align-middle"
>{{ label }} >{{ label }}
</gl-new-dropdown-item> </gl-new-dropdown-item>
......
{
"alerts": [
{
"id": 1,
"iid": "1527542",
"title": "SyntaxError: Invalid or unexpected token",
"severity": "Critical",
"eventCount": 7,
"startedAt": "2020-04-17T23:18:14.996Z",
"endedAt": "2020-04-17T23:18:14.996Z",
"status": "triggered"
}
]
}
...@@ -30,5 +30,9 @@ describe('AlertDetails', () => { ...@@ -30,5 +30,9 @@ describe('AlertDetails', () => {
it('renders alert details', () => { it('renders alert details', () => {
expect(wrapper.find('[data-testid="startTimeItem"]').exists()).toBe(true); expect(wrapper.find('[data-testid="startTimeItem"]').exists()).toBe(true);
}); });
it('renders a status dropdown', () => {
expect(wrapper.find('[data-testid="statusDropdownItem"]').exists()).toBe(true);
});
}); });
}); });
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