[expo-router] Add testID support to NativeTabs.Trigger
Noah Applebaum
NativeTabs.Trigger does not expose a stable, documented prop for assigning a test identifier to the native tab bar item.
There is an unstable_nativeProps escape hatch, but this is explicitly unstable and forwards raw react-native-screens props. This makes it unsuitable as a long-term testing interface.
JavaScript tabs already support tabBarButtonTestID via @react-navigation/bottom-tabs, but NativeTabs.Trigger has no equivalent.
Use case:
We use Maestro for E2E testing. Currently, native tabs can only be targeted using text selectors (e.g. tapOn: "Dashboard"), which breaks with localization. We need stable, testID-based selectors like the rest of the app.
Proposed solution:
Add a stable prop such as:
- tabBarButtonTestID?: string (preferred for parity), or
- testID?: string
This should map to the underlying native tab bar item test identifier.