test: add SPM + Xcode-app integration harnesses for the a11y-scan plugin#31
Open
Crash0v3rrid3 wants to merge 1 commit into
Open
test: add SPM + Xcode-app integration harnesses for the a11y-scan plugin#31Crash0v3rrid3 wants to merge 1 commit into
Crash0v3rrid3 wants to merge 1 commit into
Conversation
Adds a tests/ folder with two consumer harnesses that integrate this repo's a11y-scan command plugin (path dependency on the repo root) and run accessibility scans over sample sources with intentional issues: - tests/spm/: a SwiftPM package that declares the AccessibilityDevTools dependency and invokes the command plugin via 'swift package plugin … scan' (scripts/run-a11y-scan.sh). Includes an XCTest unit test plus a credential-gated end-to-end scan test. Verified: swift build + swift test pass and the plugin is discoverable. The plugin is intentionally NOT placed in a target's plugins: array — it is a command (not build-tool) plugin, and attaching it breaks swift build. - tests/xcode-app/: an iOS app described by an XcodeGen project.yml that runs the scan from a pre-compile build phase (the official Xcode integration), backed by a minimal Package.swift scan driver. Includes a unit-test target. project.yml validates as YAML and the scan driver resolves + exposes the plugin; the generated .xcodeproj was not built in this headless environment. Both harnesses no-op/skip without BrowserStack credentials so builds and tests stay green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
tests/folder with two consumer harnesses that integrate this repo'sa11y-scancommand plugin (via a path dependency on the repo root,../..) and run accessibility scans over sample sources containing intentional issues.tests/spm/— SwiftPM consumerAccessibilityDevToolsdependency and invokes the command plugin viaswift package plugin … scan(scripts/run-a11y-scan.sh).RUN_A11Y_SCAN=1).plugins:array —a11y-scanis a command plugin (not build-tool), and attaching it makesswift buildfail with "Plugin is declared with thebuildToolcapability…".tests/xcode-app/— Xcode appproject.yml, so the generated.xcodeprojis gitignored.Package.swiftscan driver. Unit-test target included.ENABLE_USER_SCRIPT_SANDBOXINGdisabled so the scan can write~/.cache.Both harnesses skip/no-op without
BROWSERSTACK_USERNAME/BROWSERSTACK_ACCESS_KEY, so builds and tests stay green.Verification
tests/spm:swift build✅,swift test✅ (unit test passes, scan test skips by default);swift package plugin --listshows'scan' (plugin 'a11y-scan' in package 'AccessibilityDevTools').tests/xcode-app:project.ymlvalidates as YAML; scan driver resolves and exposes the plugin; both shell scripts passbash -n.xcodegen generate+xcodebuild test(xcodegen/Xcode simulator unavailable) and a live scan (needs BrowserStack creds). Generate and run locally to validate on your toolchain.🤖 Generated with Claude Code