diff --git a/packages/elements/src/Header/Header.tsx b/packages/elements/src/Header/Header.tsx index f21794f799..0fea6a5ec7 100644 --- a/packages/elements/src/Header/Header.tsx +++ b/packages/elements/src/Header/Header.tsx @@ -53,6 +53,7 @@ export function Header(props: Props) { modal = false, title, headerTitle: customTitle, + headerTitleTestID, headerTitleAlign = Platform.select({ ios: 'center', default: 'left', @@ -272,6 +273,7 @@ export function Header(props: Props) { allowFontScaling: titleAllowFontScaling, tintColor: headerTintColor, style: titleStyle, + testID: headerTitleTestID, })} React.ReactNode); + /** + * ID to locate the header in tests. + */ + headerTitleTestID?: string; /** * How to align the the header title. * Defaults to `center` on iOS and `left` on Android. @@ -145,6 +149,10 @@ export type HeaderTitleProps = { * Style object for the title element. */ style?: Animated.WithAnimatedValue>; + /** + * ID to locate the header title in tests. + */ + testID?: string; }; export type HeaderButtonProps = {