Skip to content

test: make the suite work against a stack on another machine - #208

Open
mdozhdev wants to merge 9 commits into
mainfrom
test/e2e-remote-jobs
Open

test: make the suite work against a stack on another machine#208
mdozhdev wants to merge 9 commits into
mainfrom
test/e2e-remote-jobs

Conversation

@mdozhdev

@mdozhdev mdozhdev commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

#206 made the backend host configurable. Running the suite that way surfaced further places assuming localhost, plus two assertions that only flake on hosted runners.

Relaunch loses the backend host. processArguments applies only to a session's first launch, so reinstallApp() dropped E2E_LOCAL_HOST and the app fell back to the Info.plist value fixed at build time — onboarding then timed out on TotalBalance-primary. Relaunch via mobile: launchApp, which takes an environment. Guarded on iOS and on the variable being set; nine call sites.

LND's cert misses its reachable address. It self-issues with SANs for 127.0.0.1, ::1 and its container IP, and both gRPC and REST verify the hostname. --tlsextraip adds the real address, reusing the variable --externalip already takes.

The lnurl spec pinned LND to 127.0.0.1:8080 while taking its macaroon and cert from lndConfig. Now reads the host from the same config.

WDA timeouts and logs. WDA compiles on cold hosted runners and intermittently blew the 5-minute launch timeout, while logLevel: warn hid the Appium log.

Capped-amount and toast assertions. The send screen caps numberpad input at the available amount, so the old "type over balance" check raced a 1.5s toast. Reads the cap from its MoneyText element, then asserts the cap holds. Same race dismissing the balance-unit toast, which expires before the drag runs.

Defaults are unchanged except the Appium log, which now always writes to artifacts/ (override with APPIUM_LOG_PATH).

Verified: full iOS shard green against a stack on a second runner — synonymdev/bitkit-ios run 33273316740. tsc/eslint findings unchanged from main.

Branch name matches synonymdev/bitkit-ios test/e2e-remote-jobs so determine-e2e-branch pairs them automatically.

Related: synonymdev/pubky-stack#275, #206

mdozhdev and others added 3 commits August 27, 2026 12:01
processArguments in the session capabilities apply only to the first
launch. reinstallApp and the other relaunch helpers call
driver.activateApp, which starts the app with no environment, so
E2E_LOCAL_HOST is lost and Env.swift falls back to the Info.plist value
fixed at build time.

Against a stack on another machine that means the app looks for Electrum
on the simulator itself and never produces a balance, so completeOnboarding
times out waiting for TotalBalance-primary. Every spec reinstalls in a
before hook, so it affects all of them.

Relaunch through `mobile: launchApp`, which does take an environment.
Guarded on iOS and on the variable being set, so nothing changes for
Android or for runs against a local stack.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Session creation intermittently times out waiting for WebDriverAgent, and
logLevel warn hides whether it is building, launching or failing to
connect. Route the appium server log to artifacts and let the level and
the WDA timeouts be raised per run.

Defaults are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
LND issues its own cert on first start with SANs for 127.0.0.1, ::1 and
its container address. Both gRPC and REST verify the hostname, so a suite
running on another machine is rejected:

  ERR_TLS_CERT_ALTNAME_INVALID: IP 100.116.153.66 is not in the cert list:
  127.0.0.1, ::1, 172.18.0.4

tlsextraip adds the address LND is actually reached on, reusing the
variable externalip already takes. Defaults to 127.0.0.1, which is
already covered, so a local stack is unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mdozhdev and others added 4 commits August 28, 2026 18:15
The spec builds its own LNURL server pointed at LND over REST, but pinned
the address to 127.0.0.1:8080 while taking the macaroon and cert from
lndConfig. Against a stack on another machine there is nothing on
loopback, so the lnurl-channel flow never completes and ConnectButton
never appears.

Use lndConfig for the address too, which #206 already made configurable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
getAmountUnder scans for static text descendants, but AvailableAmount
exposes its value through a nested MoneyText, so the lookup found nothing
and @send_1 and @send_2 failed on every attempt. Read it the way the
onchain spec and getTotalBalance already do.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The toast expires before the drag runs, so dismissing it failed the
element lookup and flaked @settings_01.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mdozhdev
mdozhdev force-pushed the test/e2e-remote-jobs branch from 5c3e81e to 78dce12 Compare August 30, 2026 09:51
mdozhdev and others added 2 commits August 30, 2026 12:04
The controller script only needs python3 with websockets and reads its
endpoint from TREZOR_CONTROLLER_WS, so docker exec was only supplying an
interpreter. Under TREZOR_REMOTE=1 it runs locally against a forwarded
controller socket and the container lifecycle is left to whoever started
it, which lets the suite drive an emulator on a host that has Docker.

Default behaviour is unchanged. The compose service also gains a
host-gateway alias and an overridable MACOS flag so it can start on Linux.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
protocol_v1.probe drains stale responses with a 0.1s read and stops when
it catches Timeout, but call_bridge lets the requests exception through.
On loopback the bridge always answers inside that window; reached over a
port forward it does not, and the probe dies instead of breaking.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mdozhdev
mdozhdev marked this pull request as ready for review August 31, 2026 12:42
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.

1 participant