test: make the remote-content e2e independent of the simulator locale - #95
Open
subdiox wants to merge 1 commit into
Open
test: make the remote-content e2e independent of the simulator locale#95subdiox wants to merge 1 commit into
subdiox wants to merge 1 commit into
Conversation
The scene reached the cross-process document picker with two taps that both matched `--label-regex '选取文件|Choose File'`: the first on the page's file input, the second on the action sheet iOS puts in between. Both labels are localized, so the suite fails on any simulator that is not Chinese or English — on a Japanese one the picker reads `ファイルを選択`. Neither element can be matched by identifier. WebKit does not expose an HTML `id` as an AXUniqueId, and the action sheet's options are system UI with no identifier at all (Safari's own chrome does have them — `BackButton`, `ReloadButton` — which is what makes the absence here easy to misread as a bug in the selector). Instead the fixture takes ownership of the one label it needs. An `aria-label` overrides the browser's localized text, and `accept` rules out the photo sources so iOS opens the document picker directly rather than through the action sheet. That removes the second tap along with the last localized selector; the picker is still hosted by a remote process, which is the state the test exists to reach. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: yuta.ooka <yuta.ooka@lycorp.co.jp>
subdiox
marked this pull request as ready for review
August 12, 2026 03:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
RemoteContentRecoveryTestsfails on any simulator that is not Chinese or English. It reaches the cross-process document picker with two taps, both matching--label-regex '选取文件|Choose File'— the first on the page's file input, the second on the action sheet iOS puts in between. On a Japanese simulator the picker readsファイルを選択and neither tap resolves:Why not match by identifier
That was the first thing I tried, and neither element has one:
BackButton,ReloadButton,TabOverviewButton…idhereAdding Japanese to the regex would have moved the problem rather than removed it.
Change
The fixture takes ownership of the one label the scene needs:
aria-labeloverrides the browser's localized text for the file input, so the selector is a string this test owns.accept="text/plain"rules out the photo sources, so iOS opens the document picker directly instead of going through the action sheet.The second tap and the sleep between the two go away with it, and no localized selector is left. The picker is still hosted by a remote process, so the state the test exists to reach — a frontmost tree collapsed to a bare AXApplication, recovered via cross-process discovery and flagged with a
remote_content_recoveryadvisory — is unchanged. Assertions are untouched.Verification
./scripts/test-runner.sh RemoteContentRecoveryTestspasses from a clean build on a Japanese-locale simulator (iOS 26, iPhone 17 Pro), where it fails deterministically onmain.