Repository navigation
test: dismiss system sheets regardless of language - #132
Merged
Merged
Conversation
Share the identifier/label lookup from KeyboardCommandUITests as SystemSheet and use it in testBackupExportSheetDismissesBackToEditor and dismissSystemSheet, so the Document Picker is found on Japanese and English simulators. Wait for the app's confirmation dialog to close before looking for the sheet, since it also has a キャンセル button. Closes #127 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
変更内容
#119 でアプリがローカライズを持つようになってから、Document Picker などのシステムシートの閉じるボタンは identifier
Cancelを持たず、label が端末の言語(「Cancel」「キャンセル」)になりました。testBackupExportSheetDismissesBackToEditorと補助関数dismissSystemSheetはまだ identifier・labelCancelで探していたため、日本語の Simulator では保存シートを見つけられずに失敗していました(CI ではこのテストをスキップしています)。KeyboardCommandUITests.testRestoreShortcutOpensBackupPickerに入れた判定(identifierCancel・Browse View (Picker)か、label「Cancel」「キャンセル」)を、新しいios/UITests/KnittingEditorUITests/SystemSheet.swiftにまとめ、3か所から使うようにしました。Cancelか、label「Cancel」「キャンセル」のボタンで探します。project.pbxprojはxcodegen generateで再生成しました(新しいファイルの追加だけ)。アプリと Web 版の動きは変わりません。
確認内容
xcodegen generate --spec ios/project.ymlとxcodebuild build-for-testing(成功)testBackupExportSheetDismissesBackToEditorが保存シートを見つけられずに失敗することを確認testBackupExportSheetDismissesBackToEditorとKeyboardCommandUITests/testRestoreShortcutOpensBackupPickerを-only-testingで、-testLanguage jaと-testLanguage enのそれぞれで実行testBackupExportSheetDismissesBackToEditorが成功(testRestoreShortcutOpensBackupPickerは iPad 専用のため既存の条件でスキップ)、iPad は2件とも成功記録:
docs/dev-log/2026-10-08-language-independent-sheet-dismiss.mdCloses #127
🤖 Generated with Claude Code