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:
36
Tests iOS/MoodLoggingEmptyStateTests.swift
Normal file
36
Tests iOS/MoodLoggingEmptyStateTests.swift
Normal file
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// MoodLoggingEmptyStateTests.swift
|
||||
// Tests iOS
|
||||
//
|
||||
// Mood logging from empty state tests.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class MoodLoggingEmptyStateTests: BaseUITestCase {
|
||||
override var seedFixture: String? { "empty" }
|
||||
|
||||
/// From empty state, log a "Great" mood -> entry row appears in the list.
|
||||
func testLogMood_Great_FromEmptyState() {
|
||||
let dayScreen = DayScreen(app: app)
|
||||
|
||||
// The mood header should be visible (empty state shows voting header)
|
||||
dayScreen.assertMoodHeaderVisible()
|
||||
|
||||
// Tap "Great" mood button
|
||||
dayScreen.logMood(.great)
|
||||
|
||||
// After logging, verify entry was created.
|
||||
// The formatted date string depends on locale; verify at least
|
||||
// one entry row exists via accessibility label containing "Great".
|
||||
let greatEntry = app.descendants(matching: .any)
|
||||
.matching(NSPredicate(format: "label CONTAINS[cd] %@", "Great"))
|
||||
.firstMatch
|
||||
XCTAssertTrue(
|
||||
greatEntry.waitForExistence(timeout: 8),
|
||||
"An entry labeled 'Great' should appear after logging"
|
||||
)
|
||||
|
||||
captureScreenshot(name: "mood_logged_great")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user