@@ -409,7 +409,7 @@ describe('BlockUi', function() {
409
409
const instance = wrapper . instance ( ) ;
410
410
instance . helper = { parentNode : { contains : sinon . stub ( ) . returns ( true ) } } ;
411
411
wrapper . find ( 'input' ) . simulate ( 'click' ) ;
412
- instance . componentWillReceiveProps ( { blocking : true } ) ;
412
+ instance . UNSAFE_componentWillReceiveProps ( { blocking : true } ) ;
413
413
expect ( instance . focused ) . to . equal ( document . activeElement ) ;
414
414
expect ( instance . helper . parentNode . contains ) . to . have . been . called ;
415
415
} ) ;
@@ -419,7 +419,7 @@ describe('BlockUi', function() {
419
419
const wrapper = shallow ( < BlockUi keepInView > < input /> </ BlockUi > ) ;
420
420
const instance = wrapper . instance ( ) ;
421
421
sinon . spy ( window , 'addEventListener' ) ;
422
- instance . componentWillReceiveProps ( { blocking : true , keepInView : true } ) ;
422
+ instance . UNSAFE_componentWillReceiveProps ( { blocking : true , keepInView : true } ) ;
423
423
expect ( window . addEventListener ) . to . have . been . calledWith ( 'scroll' , instance . handleScroll ) ;
424
424
window . addEventListener . restore ( ) ;
425
425
} ) ;
@@ -431,7 +431,7 @@ describe('BlockUi', function() {
431
431
const wrapper = shallow ( < BlockUi blocking > < input /> </ BlockUi > ) ;
432
432
const instance = wrapper . instance ( ) ;
433
433
sinon . spy ( window , 'addEventListener' ) ;
434
- instance . componentWillReceiveProps ( { blocking : true , keepInView : true } ) ;
434
+ instance . UNSAFE_componentWillReceiveProps ( { blocking : true , keepInView : true } ) ;
435
435
expect ( window . addEventListener ) . to . have . been . calledWith ( 'scroll' , instance . handleScroll ) ;
436
436
window . addEventListener . restore ( ) ;
437
437
} ) ;
@@ -444,7 +444,7 @@ describe('BlockUi', function() {
444
444
const instance = wrapper . instance ( ) ;
445
445
const spy = sinon . spy ( ) ;
446
446
instance . focused = { focus : spy } ;
447
- instance . componentWillReceiveProps ( { blocking : false } ) ;
447
+ instance . UNSAFE_componentWillReceiveProps ( { blocking : false } ) ;
448
448
expect ( spy ) . to . have . been . called ;
449
449
} ) ;
450
450
} ) ;
@@ -453,15 +453,15 @@ describe('BlockUi', function() {
453
453
const wrapper = shallow ( < BlockUi blocking > < input /> </ BlockUi > ) ;
454
454
const instance = wrapper . instance ( ) ;
455
455
instance . focused = null ;
456
- expect ( instance . componentWillReceiveProps . bind ( instance , { blocking : false } ) ) . to . not . throw ;
456
+ expect ( instance . UNSAFE_componentWillReceiveProps . bind ( instance , { blocking : false } ) ) . to . not . throw ;
457
457
} ) ;
458
458
} ) ;
459
459
describe ( 'keepInView' , ( ) => {
460
460
it ( 'should remove a scroll listener' , ( ) => {
461
461
const wrapper = shallow ( < BlockUi blocking > < input /> </ BlockUi > ) ;
462
462
const instance = wrapper . instance ( ) ;
463
463
sinon . spy ( window , 'removeEventListener' ) ;
464
- instance . componentWillReceiveProps ( { blocking : false } ) ;
464
+ instance . UNSAFE_componentWillReceiveProps ( { blocking : false } ) ;
465
465
expect ( window . removeEventListener ) . to . have . been . calledWith ( 'scroll' , instance . handleScroll ) ;
466
466
window . removeEventListener . restore ( ) ;
467
467
} ) ;
0 commit comments