Repository navigation
test(previews): accept localized save labels - #601
Merged
Merged
Conversation
houko
force-pushed
the
fix/preview-test-locales
branch
from
November 17, 2026 18:09
e112893 to
148e08f
Compare
houko
force-pushed
the
fix/preview-test-locales
branch
from
November 18, 2026 02:01
148e08f to
16c49b2
Compare
Collaborator
Author
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.
The previews' demos say their words in the app's locale, which on a target is the machine's, but
TestButtonSaysandTestPickerWithoutHostsearched only for the English Save/Saved labels, so./examples/previewsfailed under-target macoson a Mac whose system language is Chinese.TestButtonSaysandTestPickerWithoutHostaccept both translations, asTestButtonBusyalready did.en-USandzh-CN(cx.SetLocalearoundRoot), so the Chinese path is covered headless and in CI, not only on a Chinese machine. With the old English-only selectors thezh-CNsubtests fail with the issue's error (nsgotest: no pressable view matches "text:Save").TestDocsNameDemosskips on a target: it walks../../docs/public, which the target's test app does not run beside, so it failed withlstat ../../docs/public: no such file or directoryunder-target macos. It still runs headless.Fixes #555.
Validation
go build ./...,go vet ./examples/previewsfor linux, windows, android/arm64 and js/wasm,go tool nsgo check -target all ./examples/previews,go tool nsgo test ./examples/previews(all subtests pass),go tool nsgo test -run 'Layer|Skills|Doc' ..go tool nsgo test -target macos ./examples/previewson a Mac whose system language is Chinese (zh-Hans): 4 passed, 1 skipped (TestDocsNameDemos); theen-USsubtests also pass on that target. With only the label fix, the same run still failedTestDocsNameDemos.Screenshots
None (tests only).