diff --git a/app/components/option_item/index.tsx b/app/components/option_item/index.tsx index 96a5a881b9..cc36cea44a 100644 --- a/app/components/option_item/index.tsx +++ b/app/components/option_item/index.tsx @@ -175,10 +175,12 @@ const OptionItem = ({ /> ); } else if (type === OptionType.RADIO) { + const radioComponentTestId = selected ? `${testID}.selected` : `${testID}.not_selected`; radioComponent = ( ); } else if (type === OptionType.TOGGLE) { diff --git a/app/components/option_item/radio_item.tsx b/app/components/option_item/radio_item.tsx index d79b6a4191..4978d4fd6e 100644 --- a/app/components/option_item/radio_item.tsx +++ b/app/components/option_item/radio_item.tsx @@ -38,8 +38,9 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { export type RadioItemProps = { selected: boolean; checkedBody?: boolean; + testID?: string; } -const RadioItem = ({selected, checkedBody}: RadioItemProps) => { +const RadioItem = ({selected, checkedBody, testID}: RadioItemProps) => { const theme = useTheme(); const styles = getStyleSheet(theme); @@ -60,7 +61,10 @@ const RadioItem = ({selected, checkedBody}: RadioItemProps) => { }, [checkedBody]); return ( - + {selected && getBody()} );