Skip to content

ci: run UI tests, fix the 11 failing ones - #4

Merged
Niclassslua merged 11 commits into
mainfrom
ci/ui-tests
Oct 8, 2026
Merged

Niclassslua merged 11 commits into
mainfrom
ci/ui-tests

Conversation

@Niclassslua

Copy link
Copy Markdown
Owner

Adds a parallel ui-tests CI job and fixes the 11 UI tests that failed both locally and in CI.

App fixes (accessibility): identifiers on plain containers were applied to every descendant, overriding the inner controls' own identifiers. Fixed with .accessibilityElement(children: .contain) on the Home grid and cards, project rows, the Review window/pane/sections/hunks, and the Git sidebar. Icon+text labels now combine into one element. This also gives VoiceOver the inner controls' names back.

Stale tests: the session identity moved from the window subtitle into the session bar, Weekly rhythm became fixed-size (7985b86), and branch names display without flotilla/.

Fixture: the Fix login bug worktree is now a real git worktree, since deleting refuses to remove unregistered folders.

Test-only workarounds: widget reordering goes through the context menu's Move Earlier (XCUITest drags never reach the grid's DragGesture), and the palette test types at app level (the SwiftUI field doesn't report focus on its element).

CI: the ui-tests job runs on its own xcode-27 runner, switches the display to 1920x1080 (it boots at 1024x768, narrower than the window's minimum width), and uploads ui-test-results.

The grid and each card applied .accessibilityIdentifier to a plain
container, which SwiftUI stamps onto every child: the Edit Widgets button
and each card's header icon reported the container's identifier, so UI
tests found the wrong elements or none.

Tests: resize via Contributions (Weekly rhythm became fixed-size in
7985b86) and reorder via Move Earlier, since synthesized drags never
reach the grid's DragGesture.
The project row's identifier also landed on its collapse chevron, so a
click meant for the row collapsed the project. Session bar meta labels
now combine icon and text into one element.

Tests: session identity moved from the window subtitle into the session
bar (DetailColumn), which shows the branch without the flotilla/ prefix.
Identifiers on the window, diff pane, file sections and hunks were
stamped onto every descendant, hiding the mode buttons, file comment
buttons and hunk layouts from UI tests.
Deleting a session refuses to remove a folder git doesn't list as a
worktree, so the bare fixture directory was never removed.
Comment on lines +68 to +108
runs-on: xcode-27
timeout-minutes: 45

env:
SIGNING_OVERRIDE: CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO DEVELOPMENT_TEAM=

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install XcodeGen, tmux and displayplacer
run: brew install xcodegen tmux displayplacer

- name: Install Metal toolchain
run: xcodebuild -downloadComponent MetalToolchain

# The runner boots at 1024x768, narrower than the main window's
# minimum width, which leaves the toolbar and sidebars off-screen.
- name: Use a 1920x1080 display
run: |
id=$(displayplacer list | awk '/^Persistent screen id:/ {print $4; exit}')
displayplacer "id:$id res:1920x1080"
displayplacer list | grep -m1 '^Resolution:'

- name: Generate Xcode project
run: xcodegen generate

- name: Run UI tests
run: >
make test-ui SIGNING_OVERRIDE="$SIGNING_OVERRIDE"
TEST_FLAGS="-test-timeouts-enabled YES -maximum-test-execution-time-allowance 180"

- name: Upload test results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ui-test-results
path: |
build/DerivedData/Logs/Test/*.xcresult
~/Library/Logs/DiagnosticReports/Flotilla*
retention-days: 7
…shots

VocabularyScreenshotUITests asserted nothing about the UI; it only fed
docs/ui-vocabulary.md's figures. Drop it with its scheme and publisher
scripts; the existing figures stay as hand-maintained docs. The agent-exit
test attached two screenshots nothing checked, which failed it whenever
the window was in a hidden Space.
@Niclassslua
Niclassslua merged commit 5d20ee9 into main Oct 8, 2026
7 checks passed
@Niclassslua
Niclassslua deleted the ci/ui-tests branch October 8, 2026 20:48
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.

2 participants