@@ -954,7 +954,6 @@ describe('TextInput Tests', () => {
954954 expect ( dump ) . toMatchSnapshot ( ) ;
955955 } ) ;
956956
957- // Additional functional tests for specific task requirements
958957 test ( 'TextInput should not be editable when editable set to false' , async ( ) => {
959958 const component = await app . findElementByTestID ( 'textinput-not-editable2' ) ;
960959 await component . waitForDisplayed ( { timeout : 5000 } ) ;
@@ -1160,8 +1159,8 @@ describe('TextInput Tests', () => {
11601159 let dump = await dumpVisualTree ( 'uncontrolled-textinput' ) ;
11611160 expect ( dump ) . toMatchSnapshot ( ) ;
11621161
1163- // Simulate focus by clicking
1164- await component . click ( ) ;
1162+ // Call focus() method directly
1163+ await ( component as any ) . focus ( ) ;
11651164
11661165 // After focus, the style should change (component has onFocus handler)
11671166 dump = await dumpVisualTree ( 'uncontrolled-textinput' ) ;
@@ -1176,16 +1175,12 @@ describe('TextInput Tests', () => {
11761175 // Focus first
11771176 await component . click ( ) ;
11781177
1179- // Then blur by clicking somewhere else
1180- const search = await app . findElementByTestID ( 'example_search' ) ;
1181- await search . click ( ) ;
1178+ // Call blur() method directly
1179+ await ( component as any ) . blur ( ) ;
11821180
11831181 // After blur, the style should revert (component has onBlur handler)
11841182 const dump = await dumpVisualTree ( 'uncontrolled-textinput' ) ;
11851183 expect ( dump ) . toMatchSnapshot ( ) ;
1186-
1187- // Reset search
1188- await search . setValue ( '' ) ;
11891184 } ) ;
11901185
11911186 test ( 'TextInput isFocused() should return true when the TextInput is focused' , async ( ) => {
@@ -1196,10 +1191,6 @@ describe('TextInput Tests', () => {
11961191 // Focus the component
11971192 await component . click ( ) ;
11981193
1199- // Check if the component shows focused state (style change indicates focus)
1200- const dump = await dumpVisualTree ( 'uncontrolled-textinput' ) ;
1201- expect ( dump ) . toMatchSnapshot ( ) ;
1202-
12031194 // The component should be in focused state (we can't directly test isFocused()
12041195 // but we can verify the visual state that indicates focus)
12051196 expect ( await component . isFocused ( ) ) . toBe ( true ) ;
@@ -1214,10 +1205,6 @@ describe('TextInput Tests', () => {
12141205 const search = await app . findElementByTestID ( 'example_search' ) ;
12151206 await search . click ( ) ;
12161207
1217- // Check if the component shows unfocused state
1218- const dump = await dumpVisualTree ( 'uncontrolled-textinput' ) ;
1219- expect ( dump ) . toMatchSnapshot ( ) ;
1220-
12211208 // The component should not be in focused state
12221209 expect ( await component . isFocused ( ) ) . toBe ( false ) ;
12231210
0 commit comments