Skip to content

Commit 8816dc1

Browse files
romtsnclaude
andcommitted
fix(test): Restore original test flow with killApp and Finish Activity
The previous approach of using Process.killProcess() without Finish Activity didn't work because the notification wasn't surviving process death on API 33+. Analysis of main branch (where all API levels pass) shows that the original flow works: Trigger Notification → Finish Activity → killApp → open shade → tap notification. Restores original swipe values (90%,0% → 90%,100%, 4000ms) and killApp which work on main. Keeps the runFlow for permission dialog handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bf0cfcf commit 8816dc1

File tree

1 file changed

+13
-29
lines changed
  • sentry-android-integration-tests/sentry-uitest-android-critical/maestro

1 file changed

+13
-29
lines changed

sentry-android-integration-tests/sentry-uitest-android-critical/maestro/appStart.yaml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,15 @@ name: App Start Tests
3333
- assertNotVisible: "Welcome!"
3434
- waitForAnimationToEnd
3535
- repeat:
36-
times: 5
36+
times: 3
3737
while:
38-
notVisible: "App Start Type: WARM"
38+
notVisible: "Sentry Test Notification"
3939
commands:
40-
# Reset to home screen to collapse any open shade/quick settings
41-
- pressKey: back
42-
- pressKey: home
43-
- waitForAnimationToEnd
44-
# Half-screen swipe: long enough to open shade, short enough to avoid quick settings
4540
- swipe:
4641
start: 90%, 0%
47-
end: 90%, 50%
48-
duration: 2000
49-
# Tap immediately after swipe while shade is still open
50-
- tapOn:
51-
text: "Sentry Test Notification"
52-
optional: true
42+
end: 90%, 100%
43+
duration: 4000
44+
- tapOn: "Sentry Test Notification"
5345
- assertVisible: "App Start Type: WARM"
5446

5547
# Test 4: Notification (COLD start)
@@ -65,28 +57,20 @@ name: App Start Tests
6557
visible: "Allow"
6658
commands:
6759
- tapOn: "Allow"
68-
# Use "Kill Process" button instead of killApp to avoid am force-stop
69-
# which clears notifications on API 33+
70-
- tapOn: "Kill Process"
60+
- tapOn: "Finish Activity"
61+
- assertNotVisible: "Welcome!"
62+
- killApp
7163
- waitForAnimationToEnd
7264
- repeat:
73-
times: 5
65+
times: 3
7466
while:
75-
notVisible: "App Start Type: COLD"
67+
notVisible: "Sentry Test Notification"
7668
commands:
77-
# Reset to home screen to collapse any open shade/quick settings
78-
- pressKey: back
79-
- pressKey: home
80-
- waitForAnimationToEnd
81-
# Half-screen swipe: long enough to open shade, short enough to avoid quick settings
8269
- swipe:
8370
start: 90%, 0%
84-
end: 90%, 50%
85-
duration: 2000
86-
# Tap immediately after swipe while shade is still open
87-
- tapOn:
88-
text: "Sentry Test Notification"
89-
optional: true
71+
end: 90%, 100%
72+
duration: 4000
73+
- tapOn: "Sentry Test Notification"
9074
- assertVisible: "App Start Type: COLD"
9175
# Test 5: Launch app after a broadcast receiver already created the application
9276
# Uncomment once https://github.com/mobile-dev-inc/Maestro/pull/2925 is merged

0 commit comments

Comments
 (0)