hammer-editor/ios/ios.xcodeproj
Adam Brown 43a836844d
Add iOS UI smoke tests (XCUITest) (#707)
* Add iOS UI smoke tests (XCUITest)

Adds an iOS UI smoke-test suite that drives the real app on a simulator via
XCUITest, the iOS analogue of the android/src/androidTest Compose UI tests.
The whole iOS UI is Compose Multiplatform, and CMP (1.8+) maps Compose testTags
to iOS accessibilityIdentifiers automatically, so the tests target the same
testTags the Android suite uses.

Workflows covered (all green on simulator):
- LaunchSmoke: app boots through the SwiftUI entry point, Koin + data migration
  run, project selection renders.
- ProjectWorkflow: create + open a project (exercises the create dialog text
  entry and navigation into the editor).
- SceneEditorWorkflow: create a scene and confirm it opens in the editor.
- NotesWorkflow: navigate to Notes and open the create-note screen.

Setup:
- ios/scripts/add_ui_test_target.rb idempotently creates the iosUITests
  UI-testing target + shared scheme via the xcodeproj gem (the folder previously
  had source files but no actual target).
- ios/scripts/disable_sim_hardware_keyboard.sh forces the software keyboard so
  XCUITest text entry lands (Compose fields need it).
- ios-ui-tests CI job runs the suite on a simulator and uploads the xcresult on
  failure.
- composeUi ProjectCreateDialog: tag the name field so the create flow is
  targetable (also benefits Android).

Known limitation: the app's custom rich-text editors (scene body, note body via
MarkdownEditField) do not report keyboard focus to XCUITest, so their text entry
can't be driven (only standard Compose text fields can). The scene and notes
tests therefore stop at "editor opens" / "creation screen opens"; the full
edit/create-with-body paths remain covered by the Android suite.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* iOS UI tests: type into note body via composetexteditor 2.3.0

composetexteditor 2.3.0 publishes text-editing accessibility semantics on its
editor, so XCUITest can now drive text entry into it. Bump the dependency and
promote the Notes UI test to the full Android-parity flow: create a note by
typing into the body, then assert its card appears.

The scene edit+save flow stays scoped to "scene opens" for now — text entry
works, but the scene editor's initial-buffer gating + dirty-driven save make
the save affordance unreliable to assert from an IME-driven edit; promoting it
is a follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 10:39:04 -07:00
..
project.xcworkspace clean up ios user files 2026-05-20 22:45:14 -07:00
xcshareddata/xcschemes Add iOS UI smoke tests (XCUITest) (#707) 2026-06-30 10:39:04 -07:00
project.pbxproj Add iOS UI smoke tests (XCUITest) (#707) 2026-06-30 10:39:04 -07:00