Skip to content

Scaffold Maestro E2E flows + CI workflow for iOS SDKPlayground#1

Merged
RomanLeshc merged 2 commits into
mainfrom
tf/maestro-tests
May 11, 2026
Merged

Scaffold Maestro E2E flows + CI workflow for iOS SDKPlayground#1
RomanLeshc merged 2 commits into
mainfrom
tf/maestro-tests

Conversation

@phwizard

Copy link
Copy Markdown
Member

Summary

iOS analog of `ethora-sample-android` PR #2. Mirrors the same 19 Maestro YAML flows with the same numbering and intent — resolving UI nodes by accessibility identifier (set on the SDK side via `ethora-sdk-swift` PR #6) so a single Maestro flow exercises the same scenario on both platforms.

What runs here

# Flow Covers
01 login-email Happy-path email/password login → connected
02 login-jwt Bring-your-own-auth client-flow JWT
03 list-rooms Room list renders with unread counts
04 send-text XMPP send round-trip
05 receive-text MAM delivery from a second user
06 attach-file Upload + image bubble
07 reconnect-airplane Disconnect → reconnect → history survives
08 push-deep-link APNs payload → correct room
09 logout-relogin State isolation across sessions
10 switch-app Multi-tenant app switcher
11 login-wrong-password Negative path surfaces error
13 message-edit Long-press → Edit → bubble updates
14 message-delete Long-press → Delete → tombstone or removal
15 message-reaction Long-press → React → emoji + count
16 create-room "+" → name → room visible + writable
17 search-rooms `.searchable` filter narrows + restores
18 multi-message-rapid 5 rapid sends, ordering preserved
19 room-info Room info modal → participants + leave
20 offline-pending-resend Send while disconnected → message lands

(Flow 12 reserved for typing-indicator.)

CI workflow

`.github/workflows/maestro.yml` runs on `macos-latest` with the iOS Simulator:

  1. Selects Xcode, installs `xcodegen` + Maestro.
  2. `generate_xcodeproj.sh` + `xcodebuild` for SDKPlayground.
  3. Boots iPhone 15 simulator, installs the `.app`.
  4. Seeds `test-image.png` into Photos via `simctl addmedia`.
  5. Writes ETHORA_* defaults via `simctl spawn defaults write`.
  6. Runs flows 01-07 + 09-20.
  7. Fires synthetic push via `simctl push` then runs flow 08.
  8. Uploads Maestro recordings as artifacts on failure (14d retention).

iOS matrix on release tags: `[17.5, 18.0]`. Single `18.0` on PRs.

iOS-specific differences from Android equivalents

  • `appId: com.ethora.SDKPlayground` (Android: `com.ethora`)
  • Tab labels title-case `"Setup"` / `"Chat"` / `"Logs"` (Android segmented control: uppercase)
  • System search bar via SwiftUI's `.searchable` — swipe-down on the list to reveal
  • Push delivery via `xcrun simctl push` (Android: `adb am start --es notification_jid`)
  • Test image seeded via `simctl addmedia` (Android: `adb push` + media-scan broadcast)

These are documented in `.maestro/README.md` so future contributors know where to look when something is iOS-only.

Required repo secrets

```
ETHORA_API_BASE_URL https://api.chat-qa.ethora.com/v1
ETHORA_APP_ID
ETHORA_APP_TOKEN
MAESTRO_TEST_EMAIL alice@ethora.com
MAESTRO_TEST_PASSWORD TestPass123
MAESTRO_TEST_USER_JWT client-flow JWT for 02-login-jwt
MAESTRO_TEST_ROOM_JID a known MUC room JID alice belongs to
MAESTRO_TEST_BOB_JWT bob's user-session JWT (sendAsBob.js)
MAESTRO_TEST_APPB_* second-app credentials for 10-switch-app
```

All values target chat-qa, never prod.

Test plan

  • Configure repo secrets above.
  • CI runs on the `tf/maestro-tests` branch (will fail on flows where iOS UI strings drift from current YAML — that's expected, not a regression; tighten anchors as we discover them).
  • `maestro test .maestro/flows/01-login-email.yaml` passes locally on a booted simulator with PlaygroundSession seeded by `@ethora/setup`.

phwizard added 2 commits May 10, 2026 12:25
Mirrors ethora-sample-android/.maestro/ for the SDKPlayground iOS
app. Same 19 flows, same numbering, same intent — they resolve
nodes by accessibility identifier (set on the SDK side via
ethora-sdk-swift PR #6) so a single Maestro flow exercises the
same scenario on both platforms.

Files:

  .maestro/
    config.yaml         project-level Maestro config
    README.md           Layer-2 testing intro, coverage table,
                        cross-platform parity notes
    fixtures/test-users.yaml
    assets/test-image.png   8x8 PNG seeded into Photos library by CI
    scripts/sendAsBob.js     same JS helper as Android — Maestro's
                             http.post is platform-neutral
    scripts/sendPushIntent.sh  iOS analog of Android's adb am start
                               wrapper, uses xcrun simctl push
    flows/01..20-*.yaml  19 flows (12 reserved for typing-indicator)

  .github/workflows/maestro.yml
    GitHub Actions workflow on macos-latest:
      - selects Xcode, installs xcodegen + Maestro
      - generate_xcodeproj.sh + xcodebuild for SDKPlayground
      - boots iPhone 15 simulator + installs the .app
      - seeds test-image.png into Photos via simctl addmedia
      - writes ETHORA_* defaults via simctl spawn defaults write
      - runs flows 01-07 + 09-20, then sendPushIntent.sh + flow 08
      - matrix on iOS [17.5, 18.0] for release tags, single 18.0 on PRs
      - uploads Maestro recordings on failure

  README.md
    "Testing" section with the 19-flow coverage table and a link to
    the matching Android sample. Cross-references the SDK README so
    contributors know where Layer 1 vs Layer 2 lives.

iOS-specific differences from the Android equivalents documented
in .maestro/README.md:
  - appId: com.ethora.SDKPlayground (vs com.ethora on Android)
  - Tab labels are title-case "Setup"/"Chat"/"Logs" (Android
    segmented control uses uppercase)
  - System search bar via SwiftUI's .searchable, swipe-down to reveal
  - Push delivery via xcrun simctl push (Android uses adb am start)
  - Test image seeded via simctl addmedia (Android uses adb push +
    MEDIA_SCANNER_SCAN_FILE broadcast)
Brief Layer 1 / Layer 2 mapping table showing how this iOS sample's
Maestro flows fit into the 4-platform stack and how selector strings
couple them across iOS accessibilityIdentifier / Android testTag /
Web data-testid.
@RomanLeshc RomanLeshc merged commit 24e183b into main May 11, 2026
1 check failed
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