fix(e2e): dismiss BootCheckGate picker with current heading text#2330
fix(e2e): dismiss BootCheckGate picker with current heading text#2330CodeGhost21 wants to merge 1 commit into
Conversation
`dismissBootCheckGate` was matching against legacy h2 text
("Choose core mode" / "Connect to your core") that no longer renders —
the i18n strings are now "Select a Runtime" / "Connect to Your Runtime"
(`app/src/lib/i18n/en.ts:1071-1072`). The helper therefore never detected
the picker, never clicked Continue, and never persisted
`openhuman_core_mode` to localStorage.
Pre-tinyhumansai#2247 that was harmless: the deep-link handler called
`consumeLoginToken` immediately, so the picker hovering above the WebView
didn't block the mock-backend assertions. After tinyhumansai#2247 the new OAuth
auth-readiness gate hard-depends on `openhuman_core_mode` being set, so
all three deep-link-consume mega-flow scenarios time out at 30s waiting
for the gate to lift.
Update the heading regex (centralised in a constant) to the current
strings and stop returning early on the first poll when the picker isn't
visible yet — BootCheckGate can land its first paint a beat after `#root`
gains children, and the 5s deadline already bounds the wait.
No production code touched; affects E2E test harness only.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR improves the e2e test helper for dismissing the first-run BootCheckGate modal by introducing a shared regex constant for heading detection, updating documentation, and refactoring polling logic to continue sampling until timeout when the picker is absent. ChangesBootCheckGate Dismissal Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
Summary
dismissBootCheckGateto match the current i18n heading text rendered byBootCheckGate("Select a Runtime" / "Connect to Your Runtime"), not the stale "Choose core mode" / "Connect to your core" strings the regex was still pinned to.#rootfirst gains children; the 5s deadline already bounds the wait).Problem
The
e2e / E2E (Linux / Appium Chromium)job on #2247 is failing because four deep-link-consume mega-flow scenarios time out at 30s waiting for the new OAuth auth-readiness gate to lift:The new
waitForOAuthAuthReadinessgate (added in #2247) hard-depends onlocalStorage.openhuman_core_modebeing set before it letsconsume_login_tokenthrough. That key is only persisted whenBootCheckGate's "Continue" button is clicked. In E2E,dismissBootCheckGate()is supposed to auto-click that on every spec startup, but its regex still matched the legacy heading text:/Choose core mode|Connect to your core/The current i18n values in
app/src/lib/i18n/en.ts:1071-1072are:So the helper never detected the picker, never clicked Continue, never persisted the mode, and the readiness gate timed out.
Pre-#2247 the same mismatch existed but was harmless — the deep-link handler called
consumeLoginTokenimmediately and didn't care that the picker was still hovering above the WebView. #2247 surfaces the latent bug.Solution
BOOT_CHECK_GATE_PICKER_HEADING_REGEXconstant matching/Select a Runtime|Connect to Your Runtime/(mirrors the desktop and web i18n strings).onPickeris false on the first sample; instead, pause-and-retry until the deadline so we tolerate React's first-paint timing.browser.executeso both the "is picker up" and "did modal unmount" checks stay in sync.No production code changes — this is purely the E2E test harness.
Submission Checklist
N/A: test harness helper, not a feature; exercised end-to-end by the mega-flow spec the helper supports.N/A: changes are in app/test/e2e/helpers/, excluded from coverage gate.N/A: no production behaviour change.## Related—N/A.N/A: test-only change.Closes #NNNin the## Relatedsection —N/A: unblocks the open #2247 PR; no separate issue.Impact
Unblocks the failing
e2e / E2E (Linux / Appium Chromium)job on #2247 and any future PR whose tests depend on the picker being dismissed (login-flow, runtime-picker-login, logout-relogin-onboarding, etc.). On non-fresh CEF profiles where the mode is already persisted, the helper still returns within the same 5s budget without clicking anything.Related
Summary by CodeRabbit