Skip to content

test: dismiss system sheets regardless of language - #132

Merged
K0mork merged 1 commit into
mainfrom
test/language-independent-sheet-dismiss
Oct 8, 2026
Merged

K0mork merged 1 commit into
mainfrom
test/language-independent-sheet-dismiss

Conversation

@K0mork

@K0mork K0mork commented Oct 8, 2026

Copy link
Copy Markdown
Owner

変更内容

#119 でアプリがローカライズを持つようになってから、Document Picker などのシステムシートの閉じるボタンは identifier Cancel を持たず、label が端末の言語(「Cancel」「キャンセル」)になりました。testBackupExportSheetDismissesBackToEditor と補助関数 dismissSystemSheet はまだ identifier・label Cancel で探していたため、日本語の Simulator では保存シートを見つけられずに失敗していました(CI ではこのテストをスキップしています)。

  • feat: iPadのメニューバーとキーボードショートカットに編集画面の操作を載せる #125 で KeyboardCommandUITests.testRestoreShortcutOpensBackupPicker に入れた判定(identifier Cancel・Browse View (Picker) か、label「Cancel」「キャンセル」)を、新しい ios/UITests/KnittingEditorUITests/SystemSheet.swift にまとめ、3か所から使うようにしました。
  • 閉じるボタンは、identifier Cancel か、label「Cancel」「キャンセル」のボタンで探します。
  • アプリの確認ダイアログにも「キャンセル」ボタンがあるため、「ファイルに保存」を押したあと、ダイアログが消えてから保存シートを探すようにしました。
  • project.pbxproj は xcodegen generate で再生成しました(新しいファイルの追加だけ)。

アプリと Web 版の動きは変わりません。

確認内容

  • xcodegen generate --spec ios/project.yml と xcodebuild build-for-testing(成功)
  • 変更前: iPad(iOS 27.0、日本語)の Simulator で testBackupExportSheetDismissesBackToEditor が保存シートを見つけられずに失敗することを確認
  • 変更後: iPhone 18 Pro・iPad Pro 11-inch (M5)(iOS 27.0)の Simulator で、testBackupExportSheetDismissesBackToEditor と KeyboardCommandUITests/testRestoreShortcutOpensBackupPicker を -only-testing で、-testLanguage ja と -testLanguage en のそれぞれで実行
    • 日本語・英語とも、iPhone は testBackupExportSheetDismissesBackToEditor が成功(testRestoreShortcutOpensBackupPicker は iPad 専用のため既存の条件でスキップ)、iPad は2件とも成功
  • Simulator のテスト一式、更新復元、Release Archive、オフライン bundle 検査は、この PR の CI に任せます

記録: docs/dev-log/2026-10-08-language-independent-sheet-dismiss.md

Closes #127

🤖 Generated with Claude Code

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>
@K0mork K0mork added the bug Something isn't working label Oct 8, 2026
Copilot AI balanced review requested due to automatic review settings October 8, 2026 05:06
@K0mork K0mork added the bug Something isn't working label Oct 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@K0mork
K0mork merged commit 2d98bc7 into main Oct 8, 2026
15 checks passed
@K0mork
K0mork deleted the test/language-independent-sheet-dismiss branch October 8, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P1] iOS UIテストのシステムシートの閉じるボタンを言語に依存せず探す

2 participants