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:
51
Tests iOS/SecondaryTabTests.swift
Normal file
51
Tests iOS/SecondaryTabTests.swift
Normal file
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// SecondaryTabTests.swift
|
||||
// Tests iOS
|
||||
//
|
||||
// Month, Year, and Insights tab navigation tests.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class SecondaryTabTests: BaseUITestCase {
|
||||
override var seedFixture: String? { "week_of_moods" }
|
||||
|
||||
/// Navigate to Month tab and verify content loads.
|
||||
func testMonthTab_LoadsContent() {
|
||||
let tabBar = TabBarScreen(app: app)
|
||||
tabBar.tapMonth()
|
||||
|
||||
// Month view should have some content loaded — look for the "Month" header text
|
||||
// or the month grid area. The tab should at minimum be selected.
|
||||
XCTAssertTrue(tabBar.monthTab.isSelected, "Month tab should be selected")
|
||||
|
||||
captureScreenshot(name: "month_tab")
|
||||
}
|
||||
|
||||
/// Navigate to Year tab and verify content loads.
|
||||
func testYearTab_LoadsContent() {
|
||||
let tabBar = TabBarScreen(app: app)
|
||||
tabBar.tapYear()
|
||||
|
||||
XCTAssertTrue(tabBar.yearTab.isSelected, "Year tab should be selected")
|
||||
|
||||
captureScreenshot(name: "year_tab")
|
||||
}
|
||||
|
||||
/// Navigate to Insights tab and verify the header is visible.
|
||||
func testInsightsTab_ShowsHeader() {
|
||||
let tabBar = TabBarScreen(app: app)
|
||||
tabBar.tapInsights()
|
||||
|
||||
XCTAssertTrue(tabBar.insightsTab.isSelected, "Insights tab should be selected")
|
||||
|
||||
// Verify the Insights header text is visible
|
||||
let insightsHeader = app.staticTexts["insights_header"]
|
||||
XCTAssertTrue(
|
||||
insightsHeader.waitForExistence(timeout: 5),
|
||||
"Insights header should be visible"
|
||||
)
|
||||
|
||||
captureScreenshot(name: "insights_tab")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user