feature: Explainable Alerts
This commit is contained in:
@@ -29,6 +29,20 @@ describe('AlertCard', () => {
|
||||
expect(wrapper.text()).toContain('Sepsis Warning (SIRS — Legacy)')
|
||||
})
|
||||
|
||||
it('showsNarrativeSummaryWhenExplanationPresent', () => {
|
||||
const wrapper = mount(AlertCard, {
|
||||
props: {
|
||||
alert: {
|
||||
...openAlert,
|
||||
explanation: {
|
||||
narrativeSummary: 'NEWS2 8 — respiratory rate (+3), SpO2 (+2).',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
expect(wrapper.text()).toContain('NEWS2 8 — respiratory rate (+3), SpO2 (+2).')
|
||||
})
|
||||
|
||||
it('acknowledgeButtonEmitsEvent', async () => {
|
||||
const wrapper = mount(AlertCard, { props: { alert: openAlert } })
|
||||
const ackButton = wrapper.findAll('button').find(b => b.text() === 'Acknowledge')
|
||||
|
||||
Reference in New Issue
Block a user