test(accessibility): Add navigation chrome fixtures#48
Conversation
Add playground fixtures and E2E coverage for navigation search fields, toolbar segmented pickers, generated navigation back buttons, and numeric AXValue fields in accessibility trees. The tests assert simulator state after AXe actions so they verify the event was processed, not just that the CLI returned success. Co-Authored-By: OpenAI Codex <noreply@openai.com>
WalkthroughThis pull request introduces three new accessibility fixture views for testing SwiftUI controls: a slider value test, a searchable/filterable list test, and a toolbar segmented picker test. Each fixture view is instrumented with accessibility identifiers and values for automated discovery. The views are wired into the app's navigation system via new routes and menu items in the Accessibility section. Comprehensive end-to-end tests cover element discovery via describe-ui parsing, tap-based interactions for state mutations and navigation, and typing into searchable fields with state filtering. The changelog is updated to document fixes for selector decoding of numeric accessibility values and expanded support for SwiftUI control activation via tap selectors. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 12: Update the changelog entry to include issue references in the
internal format: append the issue link(s) after the description using
"([`#123`](https://github.com/cameroncooke/AXe/issues/123))" style; for example
modify the line mentioning describe-ui, selector-based tap --label,
CoreSimulator accessibility bridge, SwiftUI TabView, and AXValue numeric fields
so it ends with the appropriate issue reference(s) in that exact format
(referencing the specific issue numbers for this fix).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4de9b049-d9b3-4f5c-9f81-bf0dfa2a68ac
📒 Files selected for processing (6)
AxePlaygroundApp/AxePlayground/ContentView.swiftAxePlaygroundApp/AxePlayground/Views/AccessibilityFixturesView.swiftCHANGELOG.mdTests/DescribeUITests.swiftTests/TapTests.swiftTests/TypeTests.swift
| ### Fixed | ||
|
|
||
| - Fixed `describe-ui` and selector-based `tap --label` exposing and activating real SwiftUI `TabView` tab items from the CoreSimulator accessibility bridge. | ||
| - Fixed `describe-ui` and selector-based `tap --label` exposing and activating real SwiftUI `TabView` tab items, navigation search fields, toolbar segmented picker items, and generated navigation back buttons from the CoreSimulator accessibility bridge. Also fixed selector decoding when the accessibility tree contains numeric `AXValue` fields such as sliders. |
There was a problem hiding this comment.
Add issue links to match internal changelog entry format.
This new internal fix entry should include issue references in the required format.
Suggested update
-- Fixed `describe-ui` and selector-based `tap --label` exposing and activating real SwiftUI `TabView` tab items, navigation search fields, toolbar segmented picker items, and generated navigation back buttons from the CoreSimulator accessibility bridge. Also fixed selector decoding when the accessibility tree contains numeric `AXValue` fields such as sliders.
+- Fixed `describe-ui` and selector-based `tap --label` exposing and activating real SwiftUI `TabView` tab items, navigation search fields, toolbar segmented picker items, and generated navigation back buttons from the CoreSimulator accessibility bridge. Also fixed selector decoding when the accessibility tree contains numeric `AXValue` fields such as sliders ([`#8`](https://github.com/cameroncooke/AXe/issues/8), [`#43`](https://github.com/cameroncooke/AXe/issues/43), [`#45`](https://github.com/cameroncooke/AXe/issues/45)).As per coding guidelines, For internal changes from issues, use format Fixed foo bar ([#123](https://github.com/cameroncooke/AXe/issues/123)).
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Fixed `describe-ui` and selector-based `tap --label` exposing and activating real SwiftUI `TabView` tab items, navigation search fields, toolbar segmented picker items, and generated navigation back buttons from the CoreSimulator accessibility bridge. Also fixed selector decoding when the accessibility tree contains numeric `AXValue` fields such as sliders. | |
| - Fixed `describe-ui` and selector-based `tap --label` exposing and activating real SwiftUI `TabView` tab items, navigation search fields, toolbar segmented picker items, and generated navigation back buttons from the CoreSimulator accessibility bridge. Also fixed selector decoding when the accessibility tree contains numeric `AXValue` fields such as sliders ([`#8`](https://github.com/cameroncooke/AXe/issues/8), [`#43`](https://github.com/cameroncooke/AXe/issues/43), [`#45`](https://github.com/cameroncooke/AXe/issues/45)). |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~12-~12: Possible missing comma found.
Context: ...the CoreSimulator accessibility bridge. Also fixed selector decoding when the access...
(AI_HYDRA_LEO_MISSING_COMMA)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CHANGELOG.md` at line 12, Update the changelog entry to include issue
references in the internal format: append the issue link(s) after the
description using "([`#123`](https://github.com/cameroncooke/AXe/issues/123))"
style; for example modify the line mentioning describe-ui, selector-based tap
--label, CoreSimulator accessibility bridge, SwiftUI TabView, and AXValue
numeric fields so it ends with the appropriate issue reference(s) in that exact
format (referencing the specific issue numbers for this fix).
Add playground fixtures and E2E coverage for navigation chrome accessibility behavior that was previously easy to miss: searchable navigation fields, toolbar segmented pickers, generated navigation back buttons, and numeric AXValue trees.
The tests assert simulator state after AXe actions rather than only checking that commands returned successfully. This keeps coverage focused on the real automation contract: describe the element, act on it by selector, and verify the app UI changed.
The implementation fixes for these cases are already present on main via the TabView accessibility-client work; this PR keeps the follow-up verification separate from the still-riskier slider precision work.
Fixes #8
Fixes #43
Fixes #45
Note
Low Risk
Low risk: adds new SwiftUI playground fixtures and expands E2E tests/changelog without changing core automation logic.
Overview
Adds new AxePlayground accessibility fixtures for navigation chrome edge cases: a
Sliderwith numericAXValue, a navigation.searchablefield, and a toolbar segmentedPicker, and wires them into the playground menu/navigation.Expands E2E coverage for
describe-ui, selector-basedtap, andtypeto assert these elements are exposed and actionable (including generated navigation back buttons and numericAXValuetrees), and updates the Unreleased changelog entry to reflect the broader fix scope.Reviewed by Cursor Bugbot for commit c2864c0. Bugbot is set up for automated code reviews on this repo. Configure here.