@@ -401,21 +401,43 @@ describe('DropdownAlert component', () => {
401
401
} ) ;
402
402
} ) ;
403
403
describe ( 'updateStatusBar' , ( ) => {
404
- // FIXME: mock platform
405
- // jest.mock('Platform', () => ({
406
- // OS: 'android',
407
- // }));
408
- test ( 'expect should update status bar to active state' , ( ) => {
409
- const wrapper = shallow ( < DropdownAlert imageSrc = { imageSrc } /> ) ;
410
- wrapper . instance ( ) . updateStatusBar ( true , true ) ;
411
- } ) ;
412
- test ( 'expect should not update status bar' , ( ) => {
413
- const wrapper = shallow ( < DropdownAlert imageSrc = { imageSrc } /> ) ;
414
- wrapper . instance ( ) . updateStatusBar ( false , true ) ;
404
+ describe ( 'ios' , ( ) => {
405
+ beforeEach ( ( ) => {
406
+ jest . mock ( 'Platform' , ( ) => ( {
407
+ OS : 'ios' ,
408
+ } ) ) ;
409
+ } ) ;
410
+ test ( 'expect should update status bar to active state' , ( ) => {
411
+ const wrapper = shallow ( < DropdownAlert imageSrc = { imageSrc } /> ) ;
412
+ wrapper . instance ( ) . updateStatusBar ( true , true ) ;
413
+ } ) ;
414
+ test ( 'expect should not update status bar' , ( ) => {
415
+ const wrapper = shallow ( < DropdownAlert imageSrc = { imageSrc } /> ) ;
416
+ wrapper . instance ( ) . updateStatusBar ( false , true ) ;
417
+ } ) ;
418
+ test ( 'expect without parameters to be okay' , ( ) => {
419
+ const wrapper = shallow ( < DropdownAlert imageSrc = { imageSrc } /> ) ;
420
+ wrapper . instance ( ) . updateStatusBar ( ) ;
421
+ } ) ;
415
422
} ) ;
416
- test ( 'expect without parameters to be okay' , ( ) => {
417
- const wrapper = shallow ( < DropdownAlert imageSrc = { imageSrc } /> ) ;
418
- wrapper . instance ( ) . updateStatusBar ( ) ;
423
+ describe ( 'android' , ( ) => {
424
+ beforeEach ( ( ) => {
425
+ jest . mock ( 'Platform' , ( ) => ( {
426
+ OS : 'android' ,
427
+ } ) ) ;
428
+ } ) ;
429
+ test ( 'expect should update status bar to active state' , ( ) => {
430
+ const wrapper = shallow ( < DropdownAlert imageSrc = { imageSrc } /> ) ;
431
+ wrapper . instance ( ) . updateStatusBar ( true , true ) ;
432
+ } ) ;
433
+ test ( 'expect should not update status bar' , ( ) => {
434
+ const wrapper = shallow ( < DropdownAlert imageSrc = { imageSrc } /> ) ;
435
+ wrapper . instance ( ) . updateStatusBar ( false , true ) ;
436
+ } ) ;
437
+ test ( 'expect without parameters to be okay' , ( ) => {
438
+ const wrapper = shallow ( < DropdownAlert imageSrc = { imageSrc } /> ) ;
439
+ wrapper . instance ( ) . updateStatusBar ( ) ;
440
+ } ) ;
419
441
} ) ;
420
442
} ) ;
421
443
describe ( 'clearCloseTimeoutID' , ( ) => { } ) ;
0 commit comments