@@ -20,12 +20,30 @@ describe('HealthStatus', () => {
2020 ) ;
2121 } ) ;
2222
23+ it ( 'renders Suspended' , ( ) => {
24+ expect ( renderToStaticMarkup ( < HealthStatus status = "Suspended" /> ) ) . toMatchInlineSnapshot (
25+ `"<div><div><svg data-icon="OutlinedPauseCircleIcon" style="color:var(--pf-v5-global--disabled-color--100)"></svg> Suspended</div></div>"` ,
26+ ) ;
27+ } ) ;
28+
29+ it ( 'renders Missing' , ( ) => {
30+ expect ( renderToStaticMarkup ( < HealthStatus status = "Missing" /> ) ) . toMatchInlineSnapshot (
31+ `"<div><div><svg data-icon="GhostIcon" style="color:var(--pf-v5-global--warning-color--100)"></svg> Missing</div></div>"` ,
32+ ) ;
33+ } ) ;
34+
2335 it ( 'renders Unknown for unrecognized status' , ( ) => {
2436 expect ( renderToStaticMarkup ( < HealthStatus status = "SomethingElse" /> ) ) . toMatchInlineSnapshot (
2537 `"<div><div><svg data-icon="UnknownIcon" style="color:var(--pf-v5-global--disabled-color--100)"></svg> SomethingElse</div></div>"` ,
2638 ) ;
2739 } ) ;
2840
41+ it ( 'renders Unknown for undefined status' , ( ) => {
42+ expect ( renderToStaticMarkup ( < HealthStatus status = { undefined as any } /> ) ) . toMatchInlineSnapshot (
43+ `"<div><div><svg data-icon="UnknownIcon" style="color:var(--pf-v5-global--disabled-color--100)"></svg> </div></div>"` ,
44+ ) ;
45+ } ) ;
46+
2947 it ( 'renders popover when message is provided' , ( ) => {
3048 expect (
3149 renderToStaticMarkup ( < HealthStatus status = "Degraded" message = "Something broke" /> ) ,
@@ -65,4 +83,12 @@ describe('HealthStatusIcon', () => {
6583 `"<svg data-icon="CircleNotchIcon" class="undefined fa-spin" style="color:#0DADEA" aria-label="Progressing"></svg>"` ,
6684 ) ;
6785 } ) ;
86+
87+ it ( 'renders Unknown icon for unrecognised status' , ( ) => {
88+ expect (
89+ renderToStaticMarkup ( < HealthStatusIcon status = { 'SomethingElse' as any } /> ) ,
90+ ) . toMatchInlineSnapshot (
91+ `"<i title="SomethingElse" class="fa fa-question-circle utils-health-status-icon" style="color:#CCD6DD"></i>"` ,
92+ ) ;
93+ } ) ;
6894} ) ;
0 commit comments