Skip to content

test(mobile): fix the iOS Appium harness (WDA wrapper waits, remote Appium host, port from env) - #3717

Open
holmesworcester wants to merge 9 commits into
developfrom
test/ios-appium-harness
Open

holmesworcester wants to merge 9 commits into
developfrom
test/ios-appium-harness

Conversation

@holmesworcester

Copy link
Copy Markdown
Collaborator

What

Test-infrastructure changes for the mobile Appium harness (packages/mobile/e2e/appium), found while running test:onboarding on an iOS simulator with the QSS fixture and desktop peer on a different machine:

  • WDA wrapper waits. On iOS, WebDriverAgent reports React Native layout wrappers (e.g. get-started-component, username-registration-component, terms-of-service-component, channels_list, chat_*) as visible="false" even while every child on the screen is visible, so isDisplayed() never becomes true for them. New Mobile.screen(id) waits for the wrapper to exist on iOS and to be displayed on Android; interactive elements still use visible(). The reason is in a code comment.
  • Remote Appium host. Optional appiumHost and deviceApp config (the app's path on the Appium host), so only the simulator and Appium need to run on the Mac.
  • No plutil required on the test host. inspectIosBuild reads the bundle plists with Python when not on macOS.
  • Guard tests run under tsx (npm test), so the shared selectors import resolves.
  • README section for the split setup.

The QSS port comes from QUIET_QSS_PORT (#3715), which this branch includes via a merge until #3715 lands.

CI appium-ios (onboarding)

Its recent runs on develop-based branches fail before any test runs: pod install --deployment reports "There were changes to the podfile in deployment mode: A VisionCamera" because packages/mobile/ios/Podfile.lock on develop has no VisionCamera entry. See the follow-up commit for the lockfile refresh.

How tested

  • npm test in packages/mobile/e2e/appium: 27 pass, 2 skipped (macOS-only), 0 fail; new tests cover screen() on both platforms and the config validation.

holmes and others added 4 commits October 26, 2026 15:37
…S_PORT

Sessions that share a host each need their own QSS fixture, but the Appium and
community harness, the Android adb reverse route and the QSS-only backend all
hardcoded port 3003. QUIET_QSS_PORT (default 3003, 1024-65535) now selects the
loopback port; the QSS-only backend accepts ws://localhost:<port> for any such
port. Adds a unit test that runs with a non-default port and wires it into the
workflows that already run the sibling harness tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… reading for the Appium harness

- appiumHost / deviceApp config so only the simulator and Appium run on the Mac
- Mobile.screen(): WDA reports React Native layout wrappers as visible=false, so wait for existence on iOS
- read the iOS bundle plists with Python when plutil is unavailable
- run the guard tests under tsx so the shared selectors import resolves

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nt` passes

The lockfile had no VisionCamera entry, so the iOS Appium job failed at pod install before any test ran.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@holmesworcester
holmesworcester marked this pull request as ready for review October 27, 2026 08:31
holmesworcester and others added 5 commits October 27, 2026 03:54
…ney fails at desktop-open

Both CI lanes fail there with only an error class in the artifact; no invitation or token exists yet at that stage.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rror lines from the desktop log on desktop-open failures

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… guard

The webpack banner serialized requireQssOnlyEnvironment with toString(), which
dropped the isAllowedEndpoint helper it now calls, so every QSS-only backend
threw a ReferenceError at startup and the Appium desktop peer quit.

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

# Conflicts:
#	packages/mobile/ios/Podfile.lock
module.exports = { MARKER, ENDPOINT, requireQssOnlyEnvironment }
// The bundle banner runs this check before any bundled code, so it inlines every function the check calls.
function startupGuardSource() {
return `(function () { const ENDPOINT = ${JSON.stringify(ENDPOINT)}; ${isAllowedEndpoint.toString()} (${requireQssOnlyEnvironment.toString()})(process.env); })();`

This branch has not been deployed

No deployments
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