// // MonthShareTemplateTests.swift // Tests iOS // // TC-116: This Month - Clean Calendar sharing template renders. // TC-117: This Month - Stacked Bars sharing template renders. // import XCTest final class MonthShareTemplateTests: BaseUITestCase { override var seedFixture: String? { "week_of_moods" } override var bypassSubscription: Bool { true } /// TC-116: Tap Month share button and verify the sharing picker appears. func testMonthShare_CleanCalendarTemplate_Renders() { let tabBar = TabBarScreen(app: app) tabBar.tapMonth() let shareButton = app.element(UITestID.Month.shareButton) shareButton.waitUntilHittableOrFail( timeout: navigationTimeout, message: "Month share button should be hittable" ) shareButton.forceTap() // Verify the sharing picker appears with an Exit button let exitButton = app.buttons["Exit"].firstMatch exitButton.waitForExistenceOrFail( timeout: navigationTimeout, message: "Sharing picker Exit button should appear" ) captureScreenshot(name: "month_share_clean_calendar") exitButton.forceTap() } /// TC-117: Swipe to second design and verify Stacked Bars label appears. func testMonthShare_StackedBarsTemplate_Renders() { let tabBar = TabBarScreen(app: app) tabBar.tapMonth() let shareButton = app.element(UITestID.Month.shareButton) shareButton.waitUntilHittableOrFail( timeout: navigationTimeout, message: "Month share button should be hittable" ) shareButton.forceTap() let exitButton = app.buttons["Exit"].firstMatch exitButton.waitForExistenceOrFail( timeout: navigationTimeout, message: "Sharing picker Exit button should appear" ) app.swipeLeft() let stackedBarsLabel = app.staticTexts["Stacked Bars"].firstMatch stackedBarsLabel.waitForExistenceOrFail( timeout: navigationTimeout, message: "Stacked Bars design label should be visible after swiping" ) captureScreenshot(name: "month_share_stacked_bars") exitButton.forceTap() } }