// // YearShareTemplateTests.swift // Tests iOS // // TC-111: All Time Moods - Gradient sharing template renders. // TC-112: All Time Moods - Color Block sharing template renders. // import XCTest final class YearShareTemplateTests: BaseUITestCase { override var seedFixture: String? { "week_of_moods" } override var bypassSubscription: Bool { true } /// TC-111: Tap Year share button and verify Gradient design renders. func testYearShare_GradientTemplate_Renders() { let tabBar = TabBarScreen(app: app) tabBar.tapYear() let shareButton = app.element(UITestID.Year.shareButton) shareButton.waitUntilHittableOrFail( timeout: navigationTimeout, message: "Year share button should be hittable" ) shareButton.forceTap() // Verify the sharing picker appears let exitButton = app.buttons["Exit"].firstMatch exitButton.waitForExistenceOrFail( timeout: navigationTimeout, message: "Sharing picker Exit button should appear" ) let gradientLabel = app.staticTexts["Gradient"].firstMatch gradientLabel.waitForExistenceOrFail( timeout: navigationTimeout, message: "Gradient design label should be visible" ) captureScreenshot(name: "year_share_gradient") exitButton.forceTap() } /// TC-112: Swipe to second design and verify Color Block design renders. func testYearShare_ColorBlockTemplate_Renders() { let tabBar = TabBarScreen(app: app) tabBar.tapYear() let shareButton = app.element(UITestID.Year.shareButton) shareButton.waitUntilHittableOrFail( timeout: navigationTimeout, message: "Year 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 colorBlockLabel = app.staticTexts["Color Block"].firstMatch colorBlockLabel.waitForExistenceOrFail( timeout: navigationTimeout, message: "Color Block design label should be visible after swiping" ) captureScreenshot(name: "year_share_color_block") exitButton.forceTap() } }