Skip to content

Add XCUITest target with accessibility identifiers#16

Merged
hewigovens merged 1 commit intomainfrom
ui-tests
Apr 22, 2026
Merged

Add XCUITest target with accessibility identifiers#16
hewigovens merged 1 commit intomainfrom
ui-tests

Conversation

@hewigovens
Copy link
Copy Markdown
Owner

Summary

  • Adds JayJayUITests target (new scheme JayJayUITests — won't slow down just test-app) with five scene tests: Command Palette, Interdiff, File Annotate, Review & Split, Conflict Resolution.
  • Sprinkles .accessibilityIdentifier() on the views the tests need to target: palette text field, DAG rows (keyed by change-id prefix), file list rows (keyed by path), conflict-bar "Use Ours" / "Use Theirs" buttons. Strings centralized in Sources/JayJay/Shared/AccessibilityIdentifiers.swift.
  • SceneBase reads the fixture repo path from /tmp/jayjay-demo-fixture (the XCUITest runner is sandboxed away from $HOME, so we can't use ~/). JAYJAY_DEMO_REPO env is honored as fallback.
  • Adds just test-ui top-level recipe and shell::ui-test [test_id] — no test id runs the whole bundle.
  • CI: new steps in the swift job clone a colocated jayjay fixture into /tmp and run just test-ui.

Test plan

  • just build passes
  • just test-app still runs only unit tests (UI tests isolated in their own scheme)
  • xcodebuild -scheme JayJayUITests build-for-testing succeeds
  • testOpenAndSearch passes locally (verified 16s runtime against a fixture clone)
  • CI green on macos-26 runner — this PR is primarily to see what CI does with the full bundle

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive UI testing suite for the macOS application. It includes the addition of accessibility identifiers across various views (DAG, File List, Conflict Resolution, and Command Palette) to facilitate UI automation, new just commands for running UI tests, and several XCUITest scenes covering key features like annotation, command palette search, and conflict resolution. Feedback focuses on improving test reliability and performance by replacing hardcoded pauses with expectation-based waiting and optimizing element queries to avoid expensive tree traversals.

Comment thread shell/mac/Tests/JayJayUITests/Support/SceneBase.swift Outdated
Comment thread shell/mac/Tests/JayJayUITests/Scenes/CommandPaletteScene.swift Outdated
Comment thread shell/mac/Tests/JayJayUITests/Scenes/AnnotateScene.swift Outdated
Comment thread shell/mac/Tests/JayJayUITests/Scenes/AnnotateScene.swift Outdated
@hewigovens hewigovens force-pushed the ui-tests branch 6 times, most recently from 4b9d5d3 to 2258077 Compare April 22, 2026 04:05
@hewigovens hewigovens merged commit f7e908c into main Apr 22, 2026
2 checks passed
@hewigovens hewigovens deleted the ui-tests branch April 22, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant