@@ -437,6 +437,7 @@ describe("icon_border_progress - Integration Tests", () => {
437437 {
438438 button : "sub-button-1" ,
439439 source : "sensor.saros_10_battery" ,
440+ invert : true ,
440441 start : "sensor.start_value" ,
441442 end : "sensor.end_value" ,
442443 color_stops : [
@@ -448,7 +449,7 @@ describe("icon_border_progress - Integration Tests", () => {
448449 } ,
449450 ] ;
450451
451- // Battery is at 75, with start=0 and end=200, progress should be 37 .5%
452+ // Battery is at 75, with start=0 and end=200, and invert=true, progress should be 62 .5%
452453 mockHass . states [ "sensor.saros_10_battery" ] . state = "75" ;
453454 mockHass . states [ "sensor.start_value" ] = { state : "0" } ;
454455 mockHass . states [ "sensor.end_value" ] = { state : "200" } ;
@@ -467,7 +468,7 @@ describe("icon_border_progress - Integration Tests", () => {
467468 const progressPath = svg . querySelector ( ".progress-path" ) ;
468469 expect ( progressPath ) . toBeTruthy ( ) ;
469470 expect ( progressPath . getAttribute ( "stroke" ) ) . not . toBe ( "transparent" ) ;
470- verifyStrokeDashArray ( progressPath , 0 , 0 , 112 .5, 187 .5) ;
471+ verifyStrokeDashArray ( progressPath , 0 , 0 , 187 .5, 112 .5) ;
471472 expect ( subButton1 . style . background ) . toBe ( "rgb(10, 10, 10)" ) ; // JSDOM converts #0a0a0a to rgb
472473 } ) ;
473474
0 commit comments