Port TextInput-test.js to Fantom and remove the legacy Jest test (#56559)#56559
Closed
rubennorte wants to merge 1 commit intofacebook:mainfrom
Closed
Port TextInput-test.js to Fantom and remove the legacy Jest test (#56559)#56559rubennorte wants to merge 1 commit intofacebook:mainfrom
rubennorte wants to merge 1 commit intofacebook:mainfrom
Conversation
|
@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D101977225. |
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
c04ea3e to
304ba5a
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
304ba5a to
21508a7
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Pull Request resolved: facebook#56559 Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
21508a7 to
780df1e
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
780df1e to
d3ef9de
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 22, 2026
…ebook#56559) Summary: Pull Request resolved: facebook#56559 Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
b1c3f5c to
9e38ea1
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 23, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 23, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 23, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 23, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 23, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 23, 2026
…ebook#56559) Summary: Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
…ebook#56559) Summary: Pull Request resolved: facebook#56559 Migrates the remaining meaningful coverage from `TextInput-test.js` (Jest with snapshots) over to `TextInput-itest.js` (Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one. Changes in `TextInput-itest.js`: - Add a `focus()` test verifying that focusing a `TextInput` unfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused"). - Add a top-level `has the correct displayName` test. - Add a new set of `props` describes that assert the props from the original Jest snapshot tests reach the mounting layer via `getRenderedOutput({props: [...]}).toJSX()`: - `id and nativeID`: `id` → `nativeID` mapping, `nativeID` pass-through, and `id` precedence over `nativeID`. - `testID`: pass-through. - `aria-label and accessibilityLabel`: `aria-label` → `accessibilityLabel` mapping and `accessibilityLabel` pass-through. - `aria-* and accessibilityState`: `aria-busy/checked/disabled/expanded/selected` mapped into `accessibilityState`. - `accessibilityRole`: pass-through. - `style`: `backgroundColor` propagated as a native color value. Tests intentionally NOT ported: - Inherited `HostInstance` method presence checks (`focus`, `blur`, `setNativeProps`, `measure`, `measureInWindow`, `measureLayout`): they are guaranteed by Flow typing on `ReactNativeElement`, exercised in `ReactNativeElement-itest.js`, and Flow's `method-unbinding` rule prevents the simple `toBeInstanceOf(Function)` check without `$FlowFixMe` (which is forbidden by project rules). - `focus() should not do anything if the TextInput is not editable`: `TextInputState.focusTextInput` reads `textField.currentProps?.editable`, but in the new architecture `currentProps` is not exposed on the public `ReactNativeElement` instance, so the check is effectively bypassed. The Jest test only passed by monkey-patching `currentProps`. Documenting this as expected behavior in Fantom would mask a real bug. - `should give precedence to textContentType when set`: `textContentType` is iOS-only and Fantom defaults to Android (`AndroidTextInput`). Files removed: - `Libraries/Components/TextInput/__tests__/TextInput-test.js` - `Libraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snap` Changelog: [Internal] Reviewed By: javache Differential Revision: D101977225
9e38ea1 to
4006e68
Compare
|
This pull request has been merged in f69a566. |
Collaborator
|
This pull request was successfully merged by @rubennorte in f69a566 When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Migrates the remaining meaningful coverage from
TextInput-test.js(Jest with snapshots) over toTextInput-itest.js(Fantom) so we can rely on a single test file that exercises the real renderer instead of a heavily-mocked one.Changes in
TextInput-itest.js:focus()test verifying that focusing aTextInputunfocuses any previously focused one (mirrors Jest's "should unfocus when other TextInput is focused").has the correct displayNametest.propsdescribes that assert the props from the original Jest snapshot tests reach the mounting layer viagetRenderedOutput({props: [...]}).toJSX():id and nativeID:id→nativeIDmapping,nativeIDpass-through, andidprecedence overnativeID.testID: pass-through.aria-label and accessibilityLabel:aria-label→accessibilityLabelmapping andaccessibilityLabelpass-through.aria-* and accessibilityState:aria-busy/checked/disabled/expanded/selectedmapped intoaccessibilityState.accessibilityRole: pass-through.style:backgroundColorpropagated as a native color value.Tests intentionally NOT ported:
HostInstancemethod presence checks (focus,blur,setNativeProps,measure,measureInWindow,measureLayout): they are guaranteed by Flow typing onReactNativeElement, exercised inReactNativeElement-itest.js, and Flow'smethod-unbindingrule prevents the simpletoBeInstanceOf(Function)check without$FlowFixMe(which is forbidden by project rules).focus() should not do anything if the TextInput is not editable:TextInputState.focusTextInputreadstextField.currentProps?.editable, but in the new architecturecurrentPropsis not exposed on the publicReactNativeElementinstance, so the check is effectively bypassed. The Jest test only passed by monkey-patchingcurrentProps. Documenting this as expected behavior in Fantom would mask a real bug.should give precedence to textContentType when set:textContentTypeis iOS-only and Fantom defaults to Android (AndroidTextInput).Files removed:
Libraries/Components/TextInput/__tests__/TextInput-test.jsLibraries/Components/TextInput/__tests__/__snapshots__/TextInput-test.js.snapChangelog: [Internal]
Reviewed By: javache
Differential Revision: D101977225