fix(web): expand flow header variables before browser launch - #146
Conversation
|
Thanks @humuhimi — reproduced it on Nice detail: Merging once CI has run on the branch. We'll handle the follow-ups on our side — Both remaining items are now stated as ours, not asks. The error-message tidy and the central cfg.AppID expansion are on our plate — I've noted them so they don't get lost, and I can pick either up whenever you want. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
#146 fixed the web symptom: a flow declaring `url: ${BASE_URL}` handed Chromium the literal template. The cause is broader — cfg.AppID was never expanded centrally, so every platform received the template intact, and web was merely the one place it was fatal. Elsewhere it degraded in silence: the Android and iOS version lookups queried a package that cannot exist and reported no app version, which is the report field #144 had just added. Two comments in ios_devicelab.go already documented the condition and worked around it. Expand once where the header is resolved, and reuse that helper in the web path so there is a single implementation. An unset variable expanded to nothing and surfaced much later as a bare "no URL specified for launchApp" — confusing, since the flow plainly did specify a URL. Unresolved names are now named at startup, before a browser or device is touched.
Summary
Expand the Web flow header
url/appIdwith the existingScriptEnginebefore creating the CDP driver.This allows variables supplied through
-e,--env-file, and workspace configuration to be used during the initial browser navigation.Tests
url: ${BASE_URL}pkg/clitestsCloses #145