@@ -81,7 +81,11 @@ const controlStyle: ControlStyle = {
81
81
} ;
82
82
83
83
test ( `renders as expected with an absent selected value` , ( ) => {
84
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
84
+ const RightIcon = jest . fn ( ) ;
85
+ const Component = createCreatableSelectComponent < TestValue > (
86
+ controlStyle ,
87
+ RightIcon
88
+ ) ;
85
89
const onChange = jest . fn ( ) ;
86
90
const onCreate = jest . fn ( ) ;
87
91
@@ -119,7 +123,7 @@ test(`renders as expected with an absent selected value`, () => {
119
123
} ) ;
120
124
121
125
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
122
- fullHeightPopover : { controlStyle } ,
126
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
123
127
} ) ;
124
128
125
129
const close = jest . fn ( ) ;
@@ -153,10 +157,15 @@ test(`renders as expected with an absent selected value`, () => {
153
157
expect ( close ) . not . toHaveBeenCalled ( ) ;
154
158
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
155
159
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
160
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
156
161
} ) ;
157
162
158
163
test ( `renders as expected with a present selected value` , ( ) => {
159
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
164
+ const RightIcon = jest . fn ( ) ;
165
+ const Component = createCreatableSelectComponent < TestValue > (
166
+ controlStyle ,
167
+ RightIcon
168
+ ) ;
160
169
const onChange = jest . fn ( ) ;
161
170
const onCreate = jest . fn ( ) ;
162
171
@@ -198,7 +207,7 @@ test(`renders as expected with a present selected value`, () => {
198
207
} ) ;
199
208
200
209
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
201
- fullHeightPopover : { controlStyle } ,
210
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
202
211
} ) ;
203
212
204
213
const close = jest . fn ( ) ;
@@ -239,10 +248,15 @@ test(`renders as expected with a present selected value`, () => {
239
248
expect ( close ) . not . toHaveBeenCalled ( ) ;
240
249
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
241
250
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
251
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
242
252
} ) ;
243
253
244
254
test ( `renders as expected when required with an absent selected value` , ( ) => {
245
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
255
+ const RightIcon = jest . fn ( ) ;
256
+ const Component = createCreatableSelectComponent < TestValue > (
257
+ controlStyle ,
258
+ RightIcon
259
+ ) ;
246
260
const onChange = jest . fn ( ) ;
247
261
const onCreate = jest . fn ( ) ;
248
262
@@ -280,7 +294,7 @@ test(`renders as expected when required with an absent selected value`, () => {
280
294
} ) ;
281
295
282
296
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
283
- fullHeightPopover : { controlStyle } ,
297
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
284
298
} ) ;
285
299
286
300
const close = jest . fn ( ) ;
@@ -314,10 +328,15 @@ test(`renders as expected when required with an absent selected value`, () => {
314
328
expect ( close ) . not . toHaveBeenCalled ( ) ;
315
329
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
316
330
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
331
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
317
332
} ) ;
318
333
319
334
test ( `renders as expected when required with a present selected value` , ( ) => {
320
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
335
+ const RightIcon = jest . fn ( ) ;
336
+ const Component = createCreatableSelectComponent < TestValue > (
337
+ controlStyle ,
338
+ RightIcon
339
+ ) ;
321
340
const onChange = jest . fn ( ) ;
322
341
const onCreate = jest . fn ( ) ;
323
342
@@ -359,7 +378,7 @@ test(`renders as expected when required with a present selected value`, () => {
359
378
} ) ;
360
379
361
380
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
362
- fullHeightPopover : { controlStyle } ,
381
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
363
382
} ) ;
364
383
365
384
const close = jest . fn ( ) ;
@@ -400,10 +419,15 @@ test(`renders as expected when required with a present selected value`, () => {
400
419
expect ( close ) . not . toHaveBeenCalled ( ) ;
401
420
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
402
421
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
422
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
403
423
} ) ;
404
424
405
425
test ( `renders as expected when disabled with an absent selected value` , ( ) => {
406
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
426
+ const RightIcon = jest . fn ( ) ;
427
+ const Component = createCreatableSelectComponent < TestValue > (
428
+ controlStyle ,
429
+ RightIcon
430
+ ) ;
407
431
const onChange = jest . fn ( ) ;
408
432
const onCreate = jest . fn ( ) ;
409
433
@@ -441,7 +465,7 @@ test(`renders as expected when disabled with an absent selected value`, () => {
441
465
} ) ;
442
466
443
467
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
444
- fullHeightPopover : { controlStyle } ,
468
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
445
469
} ) ;
446
470
447
471
const close = jest . fn ( ) ;
@@ -475,10 +499,15 @@ test(`renders as expected when disabled with an absent selected value`, () => {
475
499
expect ( close ) . not . toHaveBeenCalled ( ) ;
476
500
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
477
501
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
502
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
478
503
} ) ;
479
504
480
505
test ( `renders as expected when disabled with a present selected value` , ( ) => {
481
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
506
+ const RightIcon = jest . fn ( ) ;
507
+ const Component = createCreatableSelectComponent < TestValue > (
508
+ controlStyle ,
509
+ RightIcon
510
+ ) ;
482
511
const onChange = jest . fn ( ) ;
483
512
const onCreate = jest . fn ( ) ;
484
513
@@ -520,7 +549,7 @@ test(`renders as expected when disabled with a present selected value`, () => {
520
549
} ) ;
521
550
522
551
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
523
- fullHeightPopover : { controlStyle } ,
552
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
524
553
} ) ;
525
554
526
555
const close = jest . fn ( ) ;
@@ -561,10 +590,15 @@ test(`renders as expected when disabled with a present selected value`, () => {
561
590
expect ( close ) . not . toHaveBeenCalled ( ) ;
562
591
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
563
592
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
593
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
564
594
} ) ;
565
595
566
596
test ( `renders as expected when required and disabled with an absent selected value` , ( ) => {
567
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
597
+ const RightIcon = jest . fn ( ) ;
598
+ const Component = createCreatableSelectComponent < TestValue > (
599
+ controlStyle ,
600
+ RightIcon
601
+ ) ;
568
602
const onChange = jest . fn ( ) ;
569
603
const onCreate = jest . fn ( ) ;
570
604
@@ -602,7 +636,7 @@ test(`renders as expected when required and disabled with an absent selected val
602
636
} ) ;
603
637
604
638
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
605
- fullHeightPopover : { controlStyle } ,
639
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
606
640
} ) ;
607
641
608
642
const close = jest . fn ( ) ;
@@ -636,10 +670,15 @@ test(`renders as expected when required and disabled with an absent selected val
636
670
expect ( close ) . not . toHaveBeenCalled ( ) ;
637
671
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
638
672
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
673
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
639
674
} ) ;
640
675
641
676
test ( `renders as expected when required and disabled with a present selected value` , ( ) => {
642
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
677
+ const RightIcon = jest . fn ( ) ;
678
+ const Component = createCreatableSelectComponent < TestValue > (
679
+ controlStyle ,
680
+ RightIcon
681
+ ) ;
643
682
const onChange = jest . fn ( ) ;
644
683
const onCreate = jest . fn ( ) ;
645
684
@@ -681,7 +720,7 @@ test(`renders as expected when required and disabled with a present selected val
681
720
} ) ;
682
721
683
722
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
684
- fullHeightPopover : { controlStyle } ,
723
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
685
724
} ) ;
686
725
687
726
const close = jest . fn ( ) ;
@@ -722,10 +761,15 @@ test(`renders as expected when required and disabled with a present selected val
722
761
expect ( close ) . not . toHaveBeenCalled ( ) ;
723
762
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
724
763
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
764
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
725
765
} ) ;
726
766
727
767
test ( `renders as expected without any options` , ( ) => {
728
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
768
+ const RightIcon = jest . fn ( ) ;
769
+ const Component = createCreatableSelectComponent < TestValue > (
770
+ controlStyle ,
771
+ RightIcon
772
+ ) ;
729
773
const onChange = jest . fn ( ) ;
730
774
const onCreate = jest . fn ( ) ;
731
775
@@ -754,7 +798,7 @@ test(`renders as expected without any options`, () => {
754
798
} ) ;
755
799
756
800
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
757
- fullHeightPopover : { controlStyle } ,
801
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
758
802
} ) ;
759
803
760
804
const close = jest . fn ( ) ;
@@ -779,10 +823,15 @@ test(`renders as expected without any options`, () => {
779
823
expect ( close ) . not . toHaveBeenCalled ( ) ;
780
824
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
781
825
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
826
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
782
827
} ) ;
783
828
784
829
test ( `renders as expected when required without any options` , ( ) => {
785
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
830
+ const RightIcon = jest . fn ( ) ;
831
+ const Component = createCreatableSelectComponent < TestValue > (
832
+ controlStyle ,
833
+ RightIcon
834
+ ) ;
786
835
const onChange = jest . fn ( ) ;
787
836
const onCreate = jest . fn ( ) ;
788
837
@@ -811,7 +860,7 @@ test(`renders as expected when required without any options`, () => {
811
860
} ) ;
812
861
813
862
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
814
- fullHeightPopover : { controlStyle } ,
863
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
815
864
} ) ;
816
865
817
866
const close = jest . fn ( ) ;
@@ -836,10 +885,15 @@ test(`renders as expected when required without any options`, () => {
836
885
expect ( close ) . not . toHaveBeenCalled ( ) ;
837
886
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
838
887
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
888
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
839
889
} ) ;
840
890
841
891
test ( `renders as expected when disabled without any options` , ( ) => {
842
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
892
+ const RightIcon = jest . fn ( ) ;
893
+ const Component = createCreatableSelectComponent < TestValue > (
894
+ controlStyle ,
895
+ RightIcon
896
+ ) ;
843
897
const onChange = jest . fn ( ) ;
844
898
const onCreate = jest . fn ( ) ;
845
899
@@ -868,7 +922,7 @@ test(`renders as expected when disabled without any options`, () => {
868
922
} ) ;
869
923
870
924
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
871
- fullHeightPopover : { controlStyle } ,
925
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
872
926
} ) ;
873
927
874
928
const close = jest . fn ( ) ;
@@ -893,10 +947,15 @@ test(`renders as expected when disabled without any options`, () => {
893
947
expect ( close ) . not . toHaveBeenCalled ( ) ;
894
948
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
895
949
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
950
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
896
951
} ) ;
897
952
898
953
test ( `renders as expected when required and disabled without any options` , ( ) => {
899
- const Component = createCreatableSelectComponent < TestValue > ( controlStyle ) ;
954
+ const RightIcon = jest . fn ( ) ;
955
+ const Component = createCreatableSelectComponent < TestValue > (
956
+ controlStyle ,
957
+ RightIcon
958
+ ) ;
900
959
const onChange = jest . fn ( ) ;
901
960
const onCreate = jest . fn ( ) ;
902
961
@@ -925,7 +984,7 @@ test(`renders as expected when required and disabled without any options`, () =>
925
984
} ) ;
926
985
927
986
expect ( rendered . type ) . toBeAFunctionWithTheStaticProperties ( {
928
- fullHeightPopover : { controlStyle } ,
987
+ fullHeightPopover : { controlStyle, rightIcon : RightIcon } ,
929
988
} ) ;
930
989
931
990
const close = jest . fn ( ) ;
@@ -950,4 +1009,5 @@ test(`renders as expected when required and disabled without any options`, () =>
950
1009
expect ( close ) . not . toHaveBeenCalled ( ) ;
951
1010
expect ( onChange ) . not . toHaveBeenCalled ( ) ;
952
1011
expect ( onCreate ) . not . toHaveBeenCalled ( ) ;
1012
+ expect ( RightIcon ) . not . toHaveBeenCalled ( ) ;
953
1013
} ) ;
0 commit comments