Skip to content

feat: [SDK-5533] add log view spec and JS event assertions - #56

Merged
fadi-george merged 4 commits into
mainfrom
fadi/sdk-5533
Oct 13, 2026
Merged

fadi-george merged 4 commits into
mainfrom
fadi/sdk-5533

Conversation

@fadi-george

Copy link
Copy Markdown
Contributor

Description

Specify a sticky log view for every demo app and use it in the Appium suite to assert JS listener events. Until now the suite only checked native-visible effects (a notification appearing, a launch URL opening), so wrapper bugs in the JS event path went unnoticed.

Details

Demo spec

  • demo/build.md: exact log message formats for SDK listeners (Prompt 1.5), new Log View prompt (2.0), log entries listed as not persisted (Phase 5), Log View test ids log_view, log_entry_{index}, log_clear_button, log_toggle_button (6.2)
  • demo/styles.md: Log View styling

Appium

  • New helpers in tests/helpers/app.ts: hasLogView, getLogMessages, countLogMessages, expectOneNewLog
  • checkNotification (02_push) now expects exactly one new foregroundWillDisplay and one new click log entry per notification
  • Android waitForNotification taps the notification instead of pressing back, so the click fires on both platforms (iOS already tapped the banner)

Effect on existing runs

Assertions skip when the demo has no log_view, so demos without one keep passing during rollout (SDK-5523). The Capacitor demo adds it in OneSignal/OneSignal-Capacitor-SDK#74.

Testing

run-local --platform=android --sdk=capacitor --spec=02 with the Capacitor demo from #74: 3/3 passing, log assertions executed (not skipped).

🤖 Generated with Claude Code

Specify a sticky log view for all demos and assert JS listener events
through it. checkNotification now expects one foregroundWillDisplay and
one click entry per notification, and Android taps the notification so
the click fires on both platforms. Demos without a log view skip the
assertions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread appium/tests/helpers/app.ts
@fadi-george
fadi-george added this pull request to stack #59 October 13, 2026 17:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadi-george
fadi-george merged commit 33ae78a into main Oct 13, 2026
2 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-5533 branch October 13, 2026 20:26
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