Add ATT (App Tracking Transparency) Implementation with Comprehensive UI Tests #13
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.
Summary
This PR adds a complete App Tracking Transparency (ATT) testing framework to BranchLinkSimulator with comprehensive UI test coverage and fixes for failing tests.
New Features
ATTManager (BranchLinkSimulator/ATTManager.swift)
ATTTestView (BranchLinkSimulator/ATTTestView.swift)
Comprehensive UI Test Suite (BranchLinkSimulatorUITests/ATTTestViewUITests.swift)
Test Results
✅ All 23 tests passing (100% pass rate)
✅ Both previously failing tests now pass
✅ Total test execution time: ~196 seconds
Test Execution Summary
Previously Failing Tests Now Pass
testRequestPermissionButtonStateMatchesATTStatus- 7.199stestTestScenariosSectionExists- 8.857sFiles Changed
New Files
BranchLinkSimulator/ATTManager.swift- ATT state management singletonBranchLinkSimulator/ATTTestView.swift- SwiftUI ATT testing interfaceBranchLinkSimulatorUITests/ATTTestViewUITests.swift- 23 comprehensive UI testsBranchLinkSimulatorUITests/BranchLinkSimulatorUITests.swift- Base UI test fileBranchLinkSimulatorUITests/BranchLinkSimulatorUITestsLaunchTests.swift- Launch testsModified Files
BranchLinkSimulator.xcodeproj/project.pbxproj- Added new files and test targets to projectTechnical Details
XCUITest Best Practices Applied
isHittableinstead ofisEnabledfor custom-styled SwiftUI buttonswaitForExistence(timeout:)for reliable element queriesATT Authorization States Covered
Testing Instructions
To run the UI tests:
Or run all 23 tests individually in Xcode Test Navigator.
Impact
Checklist
Total test execution time: ~196 seconds
Test success rate: 23/23 (100%)
Previously failing tests fixed: 2/2 (100%)