Skip to content

test: [SDK-5501] add cold-start and background notification tap tests - #57

Merged
fadi-george merged 10 commits into
mainfrom
fadi/sdk-5501
Oct 14, 2026
Merged

fadi-george merged 10 commits into
mainfrom
fadi/sdk-5501

Conversation

@fadi-george

Copy link
Copy Markdown
Contributor

Description

Add 13_notification_click to cover tapping a push notification after the app is killed (cold start) or backgrounded. This catches wrappers that drop or duplicate the click when it arrives before the JS layer has initialized (e.g. the Capacitor off-main replay bug).

Stacked on #56 (uses its log view helpers).

Details

  • Cold start (iOS only): kill the app, send a push with a launch URL through the REST API, tap the banner from SpringBoard, then assert the launch URL opened and the app is running in the background. Android is skipped because Appium can only force-stop there, which drops both FCM delivery and posted notifications.
  • Background (control): same flow with the app only backgrounded.
  • JS click assertion: after returning to the app, the demo log view must contain exactly one Notification click: <id> for the sent notification. Skipped for demos without a log view.
  • New helpers: getAppState, terminateApp, backgroundApp, getForegroundAppId, tapNotification (app.ts); isPushSubscriptionReady, and sendPushNotification which returns the notification id (selectors.ts).
  • The spec waits for the backend to report a push token before killing the app, so the send isn't rejected as an invalid target.
  • Runs last so killing the app and leaving a browser in front can't affect other specs.

Draft: not yet verified end to end. Android runs so far failed on environment issues before reaching the new assertion (stale Appium without ANDROID_HOME, FCM not delivering the first push to a fresh token, WebView context not attaching on reruns). Needs a clean iOS and Android run.

🤖 Generated with Claude Code

@fadi-george
fadi-george force-pushed the fadi/sdk-5501 branch 2 times, most recently from 7ce6555 to 860bdb2 Compare October 13, 2026 17:54
@fadi-george
fadi-george added this pull request to stack #59 October 13, 2026 17:58
@fadi-george
fadi-george marked this pull request as ready for review October 13, 2026 17:58
@fadi-george
fadi-george requested a review from a team as a code owner October 13, 2026 17:58

@sherwinski sherwinski left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments below

Comment thread appium/tests/specs/13_notification_click.spec.ts Outdated
Comment thread appium/tests/specs/13_notification_click.spec.ts Outdated
Comment thread appium/scripts/run-local/runtime.sh Outdated
Comment thread appium/tests/helpers/app.ts
Base automatically changed from fadi/sdk-5533 to main October 13, 2026 20:26
fadi-george and others added 3 commits October 13, 2026 13:26
…ap tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The launch URL opening only proves the native SDK handled the tap. Also
check the demo's log view for exactly one click entry with the sent
notification id, which catches missing or duplicate replays in the
wrapper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nch URL

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@sherwinski sherwinski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments below

Comment thread appium/tests/specs/13_notification_click.spec.ts
Comment thread appium/scripts/run-local/runtime.sh Outdated
@fadi-george
fadi-george merged commit f8d4c35 into main Oct 14, 2026
2 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-5501 branch October 14, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants