@@ -16,7 +16,7 @@ describe("Tags", () => {
1616 wrapper
1717 . find ( "Tag" )
1818 . at ( 1 )
19- . simulate ( "press" ) ;
19+ . simulate ( "press" , { persist : jest . fn ( ) } ) ;
2020
2121 expect ( wrapper . find ( "Tag" ) . length ) . toEqual ( 3 ) ;
2222 } ) ;
@@ -32,18 +32,18 @@ describe("Tags", () => {
3232 wrapper
3333 . find ( "Tag" )
3434 . at ( 0 )
35- . simulate ( "press" ) ;
35+ . simulate ( "press" , { persist : jest . fn ( ) } ) ;
3636
3737 expect ( wrapper . find ( "Tag" ) . length ) . toEqual ( 4 ) ;
3838 } ) ;
3939 } ) ;
4040
41- describe ( "TextInput " , ( ) => {
41+ describe ( "Input " , ( ) => {
4242 describe ( "onChangeText" , ( ) => {
4343 it ( "should add a new tag when a space, or comma is detected" , ( ) => {
4444 const onChangeTags = jest . fn ( ) ;
4545 const wrapper = shallow ( < Tags onChangeTags = { onChangeTags } /> ) . find (
46- "TextInput "
46+ "Input "
4747 ) ;
4848 wrapper . simulate ( "ChangeText" , "dog " ) ;
4949 expect ( onChangeTags . mock . calls ) . toEqual ( [ [ [ "dog" ] ] ] ) ;
@@ -55,7 +55,7 @@ describe("Tags", () => {
5555 const onChangeTags = jest . fn ( ) ;
5656 const wrapper = shallow (
5757 < Tags createTagOnReturn onChangeTags = { onChangeTags } />
58- ) . find ( "TextInput " ) ;
58+ ) . find ( "Input " ) ;
5959 wrapper . simulate ( "ChangeText" , "dog" ) ;
6060 wrapper . simulate ( "SubmitEditing" ) ;
6161 expect ( onChangeTags . mock . calls ) . toEqual ( [ [ [ "dog" ] ] ] ) ;
@@ -64,7 +64,7 @@ describe("Tags", () => {
6464 it ( "should remove a tag when the text is empty" , ( ) => {
6565 const onChangeTags = jest . fn ( ) ;
6666 const wrapper = shallow ( < Tags onChangeTags = { onChangeTags } /> ) . find (
67- "TextInput "
67+ "Input "
6868 ) ;
6969 wrapper . simulate ( "ChangeText" , "dog " ) ;
7070 expect ( onChangeTags . mock . calls ) . toEqual ( [ [ [ "dog" ] ] ] ) ;
@@ -73,16 +73,16 @@ describe("Tags", () => {
7373 } ) ;
7474
7575 it ( "text input should not be available if it's readyonly" , ( ) => {
76- const wrapper = shallow ( < Tags readonly /> ) . find ( "TextInput " ) ;
76+ const wrapper = shallow ( < Tags readonly /> ) . find ( "Input " ) ;
7777 expect ( wrapper . length ) . toEqual ( 0 ) ;
7878 } ) ;
7979
80- it ( "textinput should dissapear after maxNumberOfTags is reached" , ( ) => {
80+ it ( "input should dissapear after maxNumberOfTags is reached" , ( ) => {
8181 const wrapper = shallow (
8282 < Tags initialTags = { [ "love" ] } maxNumberOfTags = { 2 } />
8383 ) ;
84- wrapper . find ( "TextInput " ) . simulate ( "ChangeText" , "dog " ) ;
85- expect ( wrapper . find ( "TextInput " ) . length ) . toEqual ( 0 ) ;
84+ wrapper . find ( "Input " ) . simulate ( "ChangeText" , "dog " ) ;
85+ expect ( wrapper . find ( "Input " ) . length ) . toEqual ( 0 ) ;
8686 } ) ;
8787 } ) ;
8888 } ) ;
0 commit comments