Fix issues with critical alerts breaking the simulation

This commit is contained in:
voltsrage
2026-06-25 02:06:35 +08:00
parent df6fbed401
commit 09a84f34ba
29 changed files with 196 additions and 155 deletions
@@ -5,9 +5,9 @@ import AlertCard from '@/components/alerts/AlertCard.vue'
const openAlert = {
id: 'alert-1',
alertType: 'SepsisWarning',
severity: 'Critical',
status: 'Open',
alertType: 'SEPSIS_WARNING',
severity: 'CRITICAL',
status: 'OPEN',
details: 'SIRS criteria met',
triggeredAt: '2026-06-19T12:00:00Z',
}
@@ -15,7 +15,7 @@ const openAlert = {
const resolvedAlert = {
...openAlert,
id: 'alert-2',
status: 'Resolved',
status: 'RESOLVED',
}
describe('AlertCard', () => {
@@ -25,7 +25,7 @@ describe('AlertCard', () => {
it('showsAlertTypeAndSeverity', () => {
const wrapper = mount(AlertCard, { props: { alert: openAlert } })
expect(wrapper.text()).toContain('Critical')
expect(wrapper.text()).toContain('CRITICAL')
expect(wrapper.text()).toContain('Sepsis Warning (SIRS — Legacy)')
})
@@ -55,7 +55,7 @@ describe('AlertCard', () => {
props: {
alert: {
...openAlert,
status: 'Acknowledged',
status: 'ACKNOWLEDGED',
acknowledgedBy: 'Demo Nurse (NURSE)',
acknowledgedAt: '2026-06-19T12:30:00Z',
},