From d7a126ab859de8e40b01e4083a328ee429a8c902 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Fri, 17 Mar 2023 14:39:17 +0500 Subject: [PATCH] mobile: add test ids --- apps/mobile/app/components/sheets/topic-sheet/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/mobile/app/components/sheets/topic-sheet/index.tsx b/apps/mobile/app/components/sheets/topic-sheet/index.tsx index e640c5e6a..2e70395a1 100644 --- a/apps/mobile/app/components/sheets/topic-sheet/index.tsx +++ b/apps/mobile/app/components/sheets/topic-sheet/index.tsx @@ -238,6 +238,7 @@ export const TopicsSheet = () => { @@ -294,6 +295,7 @@ export const TopicsSheet = () => { useContext(SelectionContext); -const TopicItem = ({ item }: { item: TopicType; index: number }) => { +const TopicItem = ({ item, index }: { item: TopicType; index: number }) => { const screen = useNavigationStore((state) => state.currentScreen); const colors = useThemeStore((state) => state.colors); const selection = useSelection(); @@ -372,6 +374,7 @@ const TopicItem = ({ item }: { item: TopicType; index: number }) => { selection.setEnabled(true); selection.toggleSelection(item); }} + testID={`topic-sheet-item-${index}`} onPress={() => { if (selection.enabled) { selection.toggleSelection(item);