@@ -509,6 +509,34 @@ QUnit.test('background is moved properly when container is resized', function(as
509509 } ) ;
510510} ) ;
511511
512+ QUnit . test ( '_animateBars should be called after resize (animation enabled) (T1242436)' , function ( assert ) {
513+ const gauge = this . $container . dxBarGauge ( {
514+ animation : true ,
515+ size : { width : 200 } ,
516+ } ) . dxBarGauge ( 'instance' ) ;
517+ const animateBarsSpy = sinon . spy ( gauge , '_animateBars' ) ;
518+ const updateBarsSpy = sinon . spy ( gauge , '_updateBars' ) ;
519+
520+ gauge . option ( 'size.width' , 300 ) ;
521+
522+ assert . strictEqual ( animateBarsSpy . callCount , 1 ) ;
523+ assert . strictEqual ( updateBarsSpy . callCount , 0 ) ;
524+ } ) ;
525+
526+ QUnit . test ( '_updateBars should be called after resize (animation disabled) (T1242436)' , function ( assert ) {
527+ const gauge = this . $container . dxBarGauge ( {
528+ animation : false ,
529+ size : { width : 200 } ,
530+ } ) . dxBarGauge ( 'instance' ) ;
531+ const animateBarsSpy = sinon . spy ( gauge , '_animateBars' ) ;
532+ const updateBarsSpy = sinon . spy ( gauge , '_updateBars' ) ;
533+
534+ gauge . option ( 'size.width' , 300 ) ;
535+
536+ assert . strictEqual ( animateBarsSpy . callCount , 0 ) ;
537+ assert . strictEqual ( updateBarsSpy . callCount , 1 ) ;
538+ } ) ;
539+
512540QUnit . test ( 'Values are changed' , function ( assert ) {
513541 const done = assert . async ( ) ;
514542 const gauge = this . $container . dxBarGauge ( {
0 commit comments