Commit e4551f47 authored by lauraMon's avatar lauraMon

Updates with new information

parent 569be378
......@@ -53,7 +53,7 @@ export default {
statuses: {
triggered: s__('AlertManagement|Triggered'),
acknowledged: s__('AlertManagement|Acknowledged'),
ignored: s__('AlertManagement|Ignored'),
resolved: s__('AlertManagement|Resolved'),
},
components: {
GlEmptyState,
......@@ -155,10 +155,10 @@ export default {
<template #cell(title)="{ item }">
<div class="gl-max-w-full text-truncate">{{ item.title }}</div>
</template>
<template #cell(status)>
<gl-new-dropdown class="w-100" :text="alert.status">
<gl-new-dropdown-item v-for="(label, field) in $options.statuses" :key="field"
>{{ label }}
<template #cell(status)="{ item }">
<gl-new-dropdown class="w-100" :text="item.status">
<gl-new-dropdown-item v-for="(label, field) in $options.statuses" :key="field">
{{ label }}
</gl-new-dropdown-item>
</gl-new-dropdown>
</template>
......
......@@ -1731,6 +1731,9 @@ msgstr ""
msgid "AlertManagement|Overview"
msgstr ""
msgid "AlertManagement|Resolved"
msgstr ""
msgid "AlertManagement|Severity"
msgstr ""
......
import { mount } from '@vue/test-utils';
import { GlEmptyState, GlTable, GlAlert, GlLoadingIcon } from '@gitlab/ui';
import { GlEmptyState, GlTable, GlAlert, GlLoadingIcon, GlNewDropdown } from '@gitlab/ui';
import AlertManagementList from '~/alert_management/components/alert_management_list.vue';
import mockAlerts from '../mocks/alerts.json';
......@@ -11,6 +11,7 @@ describe('AlertManagementList', () => {
const findAlerts = () => wrapper.findAll('table tbody tr');
const findAlert = () => wrapper.find(GlAlert);
const findLoader = () => wrapper.find(GlLoadingIcon);
const findStatusDropdown = () => wrapper.find(GlNewDropdown);
function mountComponent({
props = {
......@@ -103,5 +104,14 @@ describe('AlertManagementList', () => {
expect(findAlertsTable().exists()).toBe(true);
expect(findAlerts()).toHaveLength(mockAlerts.length);
});
it('displays status dropdown', () => {
mountComponent({
props: { alertManagementEnabled: true, userCanEnableAlertManagement: true },
data: { alerts: mockAlerts, errored: false },
loading: false,
});
expect(findStatusDropdown().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