@@ -513,7 +513,8 @@ describe('props resolution', () => {
513
513
const { getByTestId } = render (
514
514
< Provider >
515
515
< Input
516
- testID = "test"
516
+ _stack = { { testID : 'StackTest' } }
517
+ _input = { { testID : 'test' } }
517
518
w = "100%"
518
519
mx = { 3 }
519
520
placeholder = "Default Input"
@@ -522,14 +523,15 @@ describe('props resolution', () => {
522
523
</ Provider >
523
524
) ;
524
525
const inputElement = getByTestId ( 'test' ) ;
525
- expect ( inputElement . props . style [ 0 ] . width ) . toBe ( '100%' ) ;
526
+ const inputElementStack = getByTestId ( 'StackTest' ) ;
527
+ expect ( inputElement . props . style . width ) . toBe ( '100%' ) ;
526
528
expect ( inputElement . props . placeholderTextColor ) . toBe (
527
529
defaultTheme . colors . blueGray [ '400' ]
528
530
) ;
529
- expect ( inputElement . props . style [ 0 ] . marginLeft ) . toBe (
531
+ expect ( inputElementStack . props . style . marginLeft ) . toBe (
530
532
defaultTheme . space [ '3' ]
531
533
) ;
532
- expect ( inputElement . props . style [ 0 ] . marginRight ) . toBe (
534
+ expect ( inputElementStack . props . style . marginRight ) . toBe (
533
535
defaultTheme . space [ '3' ]
534
536
) ;
535
537
} ) ;
@@ -541,7 +543,7 @@ describe('props resolution', () => {
541
543
const { getByTestId } = render (
542
544
< Provider theme = { newTheme } >
543
545
< Input
544
- testID = " test"
546
+ _input = { { testID : ' test' } }
545
547
_light = { {
546
548
placeholderTextColor : 'blueGray.400' ,
547
549
} }
@@ -564,7 +566,7 @@ describe('props resolution', () => {
564
566
const { getByTestId } = render (
565
567
< Provider theme = { newTheme } >
566
568
< Input
567
- testID = " test"
569
+ _input = { { testID : ' test' } }
568
570
size = "sm"
569
571
variant = "outline"
570
572
_dark = { {
@@ -574,19 +576,17 @@ describe('props resolution', () => {
574
576
</ Provider >
575
577
) ;
576
578
const inputElement = getByTestId ( 'test' ) ;
577
- expect ( inputElement . props . style [ 0 ] . fontSize ) . toBe (
578
- defaultTheme . fontSizes . sm
579
- ) ;
579
+ expect ( inputElement . props . style . fontSize ) . toBe ( defaultTheme . fontSizes . sm ) ;
580
580
} ) ;
581
581
582
582
it ( 'Input: variant' , ( ) => {
583
583
const { getByTestId } = render (
584
584
< Provider >
585
- < Input testID = " test" variant = "underlined" />
585
+ < Input _stack = { { testID : ' test' } } variant = "underlined" />
586
586
</ Provider >
587
587
) ;
588
588
const inputElement = getByTestId ( 'test' ) ;
589
- expect ( inputElement . props . style [ 0 ] . borderBottomWidth ) . toBe ( 1 ) ;
589
+ expect ( inputElement . props . style . borderBottomWidth ) . toBe ( 1 ) ;
590
590
} ) ;
591
591
592
592
// it('Input: inputElements', () => {
@@ -614,19 +614,19 @@ describe('props resolution', () => {
614
614
const { getByTestId } = render (
615
615
< Provider theme = { newTheme } >
616
616
< Input
617
- testID = "test"
617
+ _stack = { { testID : 'stackTest' } }
618
+ _input = { { testID : 'test' } }
618
619
_ios = { { _dark : { variant : 'underlined' , size : 'sm' } } }
619
620
variant = "outline"
620
621
size = "lg"
621
622
/>
622
623
</ Provider >
623
624
) ;
624
625
const inputElement = getByTestId ( 'test' ) ;
625
- expect ( inputElement . props . style [ 0 ] . borderBottomWidth ) . toBe ( 1 ) ;
626
+ const inputElementStack = getByTestId ( 'stackTest' ) ;
627
+ expect ( inputElementStack . props . style . borderBottomWidth ) . toBe ( 1 ) ;
626
628
// as input of 'sm' size is mapped to 'xs' fontsize
627
- expect ( inputElement . props . style [ 0 ] . fontSize ) . toBe (
628
- defaultTheme . fontSizes . xs
629
- ) ;
629
+ expect ( inputElement . props . style . fontSize ) . toBe ( defaultTheme . fontSizes . xs ) ;
630
630
} ) ;
631
631
632
632
// it('Input: inputElemets', () => {
@@ -651,7 +651,7 @@ describe('props resolution', () => {
651
651
const { getByTestId } = render (
652
652
< Provider >
653
653
< Input
654
- testID = " test"
654
+ _input = { { testID : ' test' } }
655
655
type = "password"
656
656
isDisabled = { true }
657
657
isRequired = { true }
0 commit comments