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:
Trey t
2026-02-17 09:37:54 -06:00
parent 1f860aafd1
commit 277e277750
47 changed files with 2386 additions and 50 deletions

View File

@@ -0,0 +1,40 @@
//
// EmptyStateTests.swift
// Tests iOS
//
// Empty state display tests.
//
import XCTest
final class EmptyStateTests: BaseUITestCase {
override var seedFixture: String? { "empty" }
/// TC-020: With no entries, the empty state should display without crashing.
func testEmptyState_ShowsNoDataMessage() {
// The app should show either the mood header (voting prompt) or
// the empty state text. Either way, it should not crash.
let moodHeader = app.otherElements["mood_header"]
let noDataText = app.staticTexts["empty_state_no_data"]
// At least one of these should be visible
let headerExists = moodHeader.waitForExistence(timeout: 5)
let noDataExists = noDataText.waitForExistence(timeout: 2)
XCTAssertTrue(
headerExists || noDataExists,
"Either mood header or 'no data' text should be visible in empty state"
)
// No entry rows should exist
let entryRows = app.descendants(matching: .any)
.matching(NSPredicate(format: "identifier BEGINSWITH %@", "entry_row_"))
.firstMatch
XCTAssertFalse(
entryRows.waitForExistence(timeout: 2),
"No entry rows should exist in empty state"
)
captureScreenshot(name: "empty_state")
}
}