+24
__e2e__/flows/report-dialog/account.default.yml
+24
__e2e__/flows/report-dialog/account.default.yml
···
1
+
appId: xyz.blueskyweb.app
2
+
---
3
+
- runScript:
4
+
file: ../../setupServer.js
5
+
env:
6
+
SERVER_PATH: ?users&follows&posts&feeds
7
+
- runFlow:
8
+
file: ../../setupApp.yml
9
+
- tapOn:
10
+
id: "e2eSignInAlice"
11
+
12
+
- tapOn: "Carla's avatar"
13
+
- tapOn:
14
+
id: "profileHeaderDropdownBtn"
15
+
- tapOn:
16
+
id: "profileHeaderDropdownReportBtn"
17
+
- tapOn:
18
+
id: "report:option:com.atproto.moderation.defs#reasonSpam"
19
+
- assertVisible:
20
+
id: "report:labeler:mod-authority.test"
21
+
- tapOn:
22
+
id: "report:submit"
23
+
- assertNotVisible:
24
+
id: "report:dialog"
+24
__e2e__/flows/report-dialog/post:default.yml
+24
__e2e__/flows/report-dialog/post:default.yml
···
1
+
appId: xyz.blueskyweb.app
2
+
---
3
+
- runScript:
4
+
file: ../../setupServer.js
5
+
env:
6
+
SERVER_PATH: ?users&follows&posts&feeds
7
+
- runFlow:
8
+
file: ../../setupApp.yml
9
+
- tapOn:
10
+
id: "e2eSignInAlice"
11
+
12
+
- tapOn:
13
+
id: "postDropdownBtn"
14
+
index: 0
15
+
- tapOn:
16
+
id: "postDropdownReportBtn"
17
+
- tapOn:
18
+
id: "report:option:com.atproto.moderation.defs#reasonSpam"
19
+
- assertVisible:
20
+
id: "report:labeler:mod-authority.test"
21
+
- tapOn:
22
+
id: "report:submit"
23
+
- assertNotVisible:
24
+
id: "report:dialog"
+35
__e2e__/flows/report-dialog/post:edit-reason.yml
+35
__e2e__/flows/report-dialog/post:edit-reason.yml
···
1
+
appId: xyz.blueskyweb.app
2
+
---
3
+
- runScript:
4
+
file: ../../setupServer.js
5
+
env:
6
+
SERVER_PATH: ?users&follows&posts&feeds
7
+
- runFlow:
8
+
file: ../../setupApp.yml
9
+
- tapOn:
10
+
id: "e2eSignInAlice"
11
+
12
+
- tapOn:
13
+
id: "postDropdownBtn"
14
+
index: 0
15
+
- tapOn:
16
+
id: "postDropdownReportBtn"
17
+
- tapOn:
18
+
id: "report:option:com.atproto.moderation.defs#reasonOther"
19
+
- assertVisible:
20
+
id: "report:labeler:mod-authority.test"
21
+
# reason "other" defaults with details open
22
+
- assertVisible:
23
+
id: "report:details"
24
+
- tapOn:
25
+
id: "report:clearOption"
26
+
- assertNotVisible:
27
+
id: "report:details"
28
+
- tapOn:
29
+
id: "report:option:com.atproto.moderation.defs#reasonSpam"
30
+
- assertVisible:
31
+
id: "report:labeler:mod-authority.test"
32
+
- tapOn:
33
+
id: "report:submit"
34
+
- assertNotVisible:
35
+
id: "report:dialog"
+30
__e2e__/flows/report-dialog/post:reason-other.yml
+30
__e2e__/flows/report-dialog/post:reason-other.yml
···
1
+
appId: xyz.blueskyweb.app
2
+
---
3
+
- runScript:
4
+
file: ../../setupServer.js
5
+
env:
6
+
SERVER_PATH: ?users&follows&posts&feeds
7
+
- runFlow:
8
+
file: ../../setupApp.yml
9
+
- tapOn:
10
+
id: "e2eSignInAlice"
11
+
12
+
- tapOn:
13
+
id: "postDropdownBtn"
14
+
index: 0
15
+
- tapOn:
16
+
id: "postDropdownReportBtn"
17
+
- tapOn:
18
+
id: "report:option:com.atproto.moderation.defs#reasonOther"
19
+
- assertVisible:
20
+
id: "report:labeler:mod-authority.test"
21
+
# reason "other" defaults with details open
22
+
- assertVisible:
23
+
id: "report:details"
24
+
- tapOn:
25
+
id: "report:details"
26
+
- inputText: "This is a test report"
27
+
- tapOn:
28
+
id: "report:submit"
29
+
- assertNotVisible:
30
+
id: "report:dialog"
+4
-1
src/components/Dialog/types.ts
+4
-1
src/components/Dialog/types.ts
···
68
68
testID?: string
69
69
}
70
70
71
-
type DialogInnerPropsBase<T> = React.PropsWithChildren<ViewStyleProp> & T
71
+
type DialogInnerPropsBase<T> = React.PropsWithChildren<ViewStyleProp> &
72
+
T & {
73
+
testID?: string
74
+
}
72
75
export type DialogInnerProps =
73
76
| DialogInnerPropsBase<{
74
77
label?: undefined
+6
src/components/moderation/ReportDialog/index.tsx
+6
src/components/moderation/ReportDialog/index.tsx
···
186
186
187
187
return (
188
188
<Dialog.ScrollableInner
189
+
testID="report:dialog"
189
190
label={_(msg`Report dialog`)}
190
191
ref={ref}
191
192
style={[a.w_full, {maxWidth: 500}]}>
···
231
232
<OptionCard option={state.selectedOption} />
232
233
</View>
233
234
<Button
235
+
testID="report:clearOption"
234
236
label={_(msg`Change report reason`)}
235
237
size="tiny"
236
238
variant="solid"
···
399
401
{state.detailsOpen && (
400
402
<View>
401
403
<Dialog.Input
404
+
testID="report:details"
402
405
multiline
403
406
value={state.details}
404
407
onChangeText={details => {
···
426
429
)}
427
430
</View>
428
431
<Button
432
+
testID="report:submit"
429
433
label={_(msg`Submit report`)}
430
434
size="large"
431
435
variant="solid"
···
566
570
}, [onSelect, option])
567
571
return (
568
572
<Button
573
+
testID={`report:option:${option.reason}`}
569
574
label={_(msg`Create report for ${option.title}`)}
570
575
onPress={onPress}
571
576
disabled={!onSelect}>
···
629
634
})
630
635
return (
631
636
<Button
637
+
testID={`report:labeler:${labeler.creator.handle}`}
632
638
label={_(msg`Send report to ${title}`)}
633
639
onPress={onPress}
634
640
disabled={!onSelect}>