Each test class now gets a unique session ID (UUID) passed to the app via UI_TEST_SESSION_ID environment variable. The app uses this to: - Route GroupUserDefaults to a session-specific UserDefaults suite, preventing tests from clobbering each other's AppStorage state - Create an in-memory SwiftData container instead of the shared on-disk App Group store, eliminating SQLite contention Refactored 8 test classes that bypassed BaseUITestCase.setUp() with custom launch args — they now use overridable `localeArguments` and `extraLaunchArguments` properties, keeping session ID injection centralized. Added `relaunchApp(resetState:bypassSubscription:)` to BaseUITestCase for tests that need mid-test relaunch with different subscription state. Includes a ParallelUITests.xctestplan with class-level parallelism enabled and random execution ordering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
46 lines
1.4 KiB
Swift
46 lines
1.4 KiB
Swift
//
|
|
// AccessibilityTextSizeTests.swift
|
|
// Tests iOS
|
|
//
|
|
// TC-142: App remains functional at largest accessibility text size.
|
|
//
|
|
|
|
import XCTest
|
|
|
|
final class AccessibilityTextSizeTests: BaseUITestCase {
|
|
override var seedFixture: String? { "single_mood" }
|
|
override var bypassSubscription: Bool { true }
|
|
override var extraLaunchArguments: [String] {
|
|
["-UIPreferredContentSizeCategoryName", "UICTContentSizeCategoryAccessibilityXXL"]
|
|
}
|
|
|
|
/// TC-142: App launches and is navigable at largest accessibility text size.
|
|
func testLargestTextSize_AppRemainsNavigable() {
|
|
// Verify Day tab is loaded and has content
|
|
assertDayContentVisible()
|
|
|
|
captureScreenshot(name: "accessibility_xxl_day")
|
|
|
|
// Navigate through all tabs to verify nothing crashes
|
|
let tabBar = TabBarScreen(app: app)
|
|
|
|
tabBar.tapMonth()
|
|
XCTAssertTrue(
|
|
tabBar.monthTab.waitForExistence(timeout: 5),
|
|
"Month tab should be accessible at XXL text size"
|
|
)
|
|
captureScreenshot(name: "accessibility_xxl_month")
|
|
|
|
tabBar.tapYear()
|
|
XCTAssertTrue(
|
|
tabBar.yearTab.waitForExistence(timeout: 5),
|
|
"Year tab should be accessible at XXL text size"
|
|
)
|
|
captureScreenshot(name: "accessibility_xxl_year")
|
|
|
|
let settingsScreen = tabBar.tapSettings()
|
|
settingsScreen.assertVisible()
|
|
captureScreenshot(name: "accessibility_xxl_settings")
|
|
}
|
|
}
|