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>
This commit is contained in:
70
Tests iOS/StabilityTests.swift
Normal file
70
Tests iOS/StabilityTests.swift
Normal file
@@ -0,0 +1,70 @@
|
||||
//
|
||||
// StabilityTests.swift
|
||||
// Tests iOS
|
||||
//
|
||||
// Full navigation stability tests — visit every screen without crash.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class StabilityTests: BaseUITestCase {
|
||||
override var seedFixture: String? { "week_of_moods" }
|
||||
|
||||
/// TC-152: Navigate to every screen and feature without crashing.
|
||||
func testFullNavigation_NoCrash() {
|
||||
let tabBar = TabBarScreen(app: app)
|
||||
|
||||
// 1. Day tab (default) - verify loaded
|
||||
XCTAssertTrue(tabBar.dayTab.isSelected, "Should start on Day tab")
|
||||
captureScreenshot(name: "stability_day")
|
||||
|
||||
// 2. Open entry detail
|
||||
let firstEntry = app.descendants(matching: .any)
|
||||
.matching(NSPredicate(format: "identifier BEGINSWITH %@", "entry_row_"))
|
||||
.firstMatch
|
||||
if firstEntry.waitForExistence(timeout: 5) {
|
||||
firstEntry.tap()
|
||||
let detailScreen = EntryDetailScreen(app: app)
|
||||
if detailScreen.navigationTitle.waitForExistence(timeout: 3) {
|
||||
captureScreenshot(name: "stability_entry_detail")
|
||||
detailScreen.dismiss()
|
||||
detailScreen.assertDismissed()
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Month tab
|
||||
tabBar.tapMonth()
|
||||
XCTAssertTrue(tabBar.monthTab.isSelected, "Month tab should be selected")
|
||||
captureScreenshot(name: "stability_month")
|
||||
|
||||
// 4. Year tab
|
||||
tabBar.tapYear()
|
||||
XCTAssertTrue(tabBar.yearTab.isSelected, "Year tab should be selected")
|
||||
captureScreenshot(name: "stability_year")
|
||||
|
||||
// 5. Insights tab
|
||||
tabBar.tapInsights()
|
||||
XCTAssertTrue(tabBar.insightsTab.isSelected, "Insights tab should be selected")
|
||||
captureScreenshot(name: "stability_insights")
|
||||
|
||||
// 6. Settings tab - Customize sub-tab
|
||||
tabBar.tapSettings()
|
||||
XCTAssertTrue(tabBar.settingsTab.isSelected, "Settings tab should be selected")
|
||||
captureScreenshot(name: "stability_settings_customize")
|
||||
|
||||
// 7. Settings tab - Settings sub-tab
|
||||
let settingsScreen = SettingsScreen(app: app)
|
||||
settingsScreen.tapSettingsTab()
|
||||
captureScreenshot(name: "stability_settings_settings")
|
||||
|
||||
// 8. Back to Customize sub-tab
|
||||
settingsScreen.tapCustomizeTab()
|
||||
captureScreenshot(name: "stability_settings_customize_return")
|
||||
|
||||
// 9. Back to Day
|
||||
tabBar.tapDay()
|
||||
XCTAssertTrue(tabBar.dayTab.isSelected, "Day tab should be selected")
|
||||
|
||||
captureScreenshot(name: "stability_full_navigation_complete")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user