Files
Reflect/Tests iOS/SettingsTests.swift
Trey t 277e277750 Add XCUITest suite with 27 test files covering unmapped P1 test cases
- Add 8 new test files: HeaderMoodLogging (TC-002), DayViewGrouping (TC-019),
  AllDayViewStyles (TC-021), MonthViewInteraction (TC-030), PaywallGate
  (TC-032/039/048), AppTheme (TC-070), IconPack (TC-072),
  PremiumCustomization (TC-075)
- Add accessibility IDs for paywall overlays, icon packs, app theme cards,
  and day view section headers
- Add --expire-trial launch argument to UITestMode for paywall gate testing
- Update QA test plan spreadsheet with XCUITest names for 14 test cases
- Include existing test infrastructure: screen objects, helpers, base class,
  and 19 previously written test files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:37:54 -06:00

45 lines
1.4 KiB
Swift

//
// SettingsTests.swift
// Tests iOS
//
// Settings tab structure and segmented control tests.
//
import XCTest
final class SettingsTests: BaseUITestCase {
override var seedFixture: String? { "empty" }
override var bypassSubscription: Bool { false }
/// Navigate to Settings and verify the header and upgrade banner appear.
func testSettingsTab_ShowsHeaderAndUpgradeBanner() {
let tabBar = TabBarScreen(app: app)
let settingsScreen = tabBar.tapSettings()
settingsScreen.assertVisible()
// With subscription NOT bypassed, upgrade banner should be visible
settingsScreen.assertUpgradeBannerVisible()
captureScreenshot(name: "settings_with_upgrade_banner")
}
/// Toggle between Customize and Settings segments.
func testSettingsTab_SegmentedControlToggle() {
let tabBar = TabBarScreen(app: app)
let settingsScreen = tabBar.tapSettings()
settingsScreen.assertVisible()
// Switch to Settings sub-tab
settingsScreen.tapSettingsTab()
// Verify we're on the Settings sub-tab (check for a settings-specific element)
// The "Settings" segment should be selected now
captureScreenshot(name: "settings_subtab")
// Switch back to Customize
settingsScreen.tapCustomizeTab()
captureScreenshot(name: "customize_subtab")
}
}