Commit d48029b
fix(test): Check notification permission before launching request to fix flaky API 34 tests
On API 34, Maestro's `permissions: all: allow` pre-grants POST_NOTIFICATIONS
via `pm grant`. The ActivityResult callback from `requestPermissionLauncher`
is not always reliably invoked when the permission is already granted,
causing the notification to never be posted. This adds a checkSelfPermission
guard so the notification is posted directly when already permitted.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 01221e2 commit d48029b
File tree
1 file changed
+9
-1
lines changed- sentry-android-integration-tests/sentry-uitest-android-critical/src/main/java/io/sentry/uitest/android/critical
1 file changed
+9
-1
lines changedLines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
| |||
0 commit comments