File tree 2 files changed +3
-23
lines changed
2 files changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ describe('test ValidatorProvider', () => {
357
357
< ValidatorArea rules = "required" >
358
358
{ ( { valid} ) => (
359
359
< >
360
- < input name = "test" value = "" />
360
+ < input name = "test" value = "test" />
361
361
< div > { valid ? 'yes' : 'no' } </ div >
362
362
</ >
363
363
) }
@@ -366,7 +366,7 @@ describe('test ValidatorProvider', () => {
366
366
367
367
area . find ( 'input' ) . at ( 0 ) . simulate ( 'blur' ) ;
368
368
await tick ( ) ;
369
- expect ( area . find ( 'div' ) . text ( ) ) . toBe ( 'no ' ) ;
369
+ expect ( area . find ( 'div' ) . text ( ) ) . toBe ( 'yes ' ) ;
370
370
} ) ;
371
371
372
372
it ( 'should indicate pending while validation is ongoing' , async ( ) => {
@@ -411,7 +411,7 @@ describe('test ValidatorProvider', () => {
411
411
412
412
it ( 'should indicate touched when input blurred' , async ( ) => {
413
413
const area = mount (
414
- < ValidatorArea rules = "long_wait " >
414
+ < ValidatorArea rules = "required " >
415
415
{ ( { touched} ) => (
416
416
< >
417
417
< input name = "test" value = "" />
Original file line number Diff line number Diff line change @@ -142,24 +142,4 @@ describe('test ValidatorProvider', () => {
142
142
await tick ( ) ;
143
143
expect ( mockFn ) . toHaveBeenCalled ( )
144
144
} ) ;
145
-
146
- it ( 'should indicate whether the area is dirty' , async ( ) => {
147
- const provider = mount < ValidatorProvider , ValidatorProviderProps > (
148
- < ValidatorProvider >
149
- { ( { dirty } ) => (
150
- < >
151
- < ValidatorArea name = "test1" rules = "required" >
152
- < input value = "1" />
153
- </ ValidatorArea >
154
- < div > { dirty ? 'yes' : 'no' } </ div >
155
- </ >
156
- ) }
157
- </ ValidatorProvider >
158
- ) ;
159
-
160
- provider . find ( 'input' ) . at ( 0 ) . simulate ( 'blur' ) ;
161
- await tick ( ) ;
162
- expect ( provider . find ( 'div' ) . text ( ) ) . toBe ( 'no' ) ;
163
-
164
- } )
165
145
} )
You can’t perform that action at this time.
0 commit comments