From 3be87fbf3b9ab354cf8c439c6aeeb28ec2c2d764 Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Wed, 5 Mar 2025 18:31:55 -0600
Subject: Add report dialog e2e tests (#7913)

---
 src/components/moderation/ReportDialog/index.tsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/components/moderation/ReportDialog/index.tsx')

diff --git a/src/components/moderation/ReportDialog/index.tsx b/src/components/moderation/ReportDialog/index.tsx
index 291699380..c785e8c5e 100644
--- a/src/components/moderation/ReportDialog/index.tsx
+++ b/src/components/moderation/ReportDialog/index.tsx
@@ -186,6 +186,7 @@ function Inner(props: ReportDialogProps) {
 
   return (
     <Dialog.ScrollableInner
+      testID="report:dialog"
       label={_(msg`Report dialog`)}
       ref={ref}
       style={[a.w_full, {maxWidth: 500}]}>
@@ -231,6 +232,7 @@ function Inner(props: ReportDialogProps) {
                     <OptionCard option={state.selectedOption} />
                   </View>
                   <Button
+                    testID="report:clearOption"
                     label={_(msg`Change report reason`)}
                     size="tiny"
                     variant="solid"
@@ -399,6 +401,7 @@ function Inner(props: ReportDialogProps) {
                 {state.detailsOpen && (
                   <View>
                     <Dialog.Input
+                      testID="report:details"
                       multiline
                       value={state.details}
                       onChangeText={details => {
@@ -426,6 +429,7 @@ function Inner(props: ReportDialogProps) {
                 )}
               </View>
               <Button
+                testID="report:submit"
                 label={_(msg`Submit report`)}
                 size="large"
                 variant="solid"
@@ -566,6 +570,7 @@ function OptionCard({
   }, [onSelect, option])
   return (
     <Button
+      testID={`report:option:${option.reason}`}
       label={_(msg`Create report for ${option.title}`)}
       onPress={onPress}
       disabled={!onSelect}>
@@ -629,6 +634,7 @@ function LabelerCard({
   })
   return (
     <Button
+      testID={`report:labeler:${labeler.creator.handle}`}
       label={_(msg`Send report to ${title}`)}
       onPress={onPress}
       disabled={!onSelect}>
-- 
cgit 1.4.1

