Add 4 passing UI tests (batch 8): sharing template rendering

- TC-111: Year share Gradient template renders in SharingStylePickerView
- TC-112: Year share Color Block template renders after swipe
- TC-116: Month share Clean Calendar template renders
- TC-117: Month share Stacked Bars template renders after swipe

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-20 10:52:53 -06:00
parent c701bf9d3b
commit f495ae90fa
4 changed files with 181 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
//
// 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 verify Clean Calendar design renders.
func testMonthShare_CleanCalendarTemplate_Renders() {
let tabBar = TabBarScreen(app: app)
tabBar.tapMonth()
// Wait for month view to load
_ = app.waitForExistence(timeout: 3)
// Find the month share button
let shareButton = app.element(UITestID.Month.shareButton)
XCTAssertTrue(
shareButton.waitForExistence(timeout: 8),
"Month share button should exist"
)
shareButton.tapWhenReady()
// Verify the SharingStylePickerView sheet appears
let exitButton = app.buttons["Exit"].firstMatch
XCTAssertTrue(
exitButton.waitForExistence(timeout: 5),
"Sharing picker Exit button should appear"
)
// First design should be "Clean Calendar"
let cleanCalendarLabel = app.staticTexts["Clean Calendar"].firstMatch
XCTAssertTrue(
cleanCalendarLabel.waitForExistence(timeout: 5),
"Clean Calendar design label should be visible"
)
captureScreenshot(name: "month_share_clean_calendar")
// Close the picker
exitButton.tap()
}
/// TC-117: Swipe to second design verify Stacked Bars design renders.
func testMonthShare_StackedBarsTemplate_Renders() {
let tabBar = TabBarScreen(app: app)
tabBar.tapMonth()
_ = app.waitForExistence(timeout: 3)
let shareButton = app.element(UITestID.Month.shareButton)
XCTAssertTrue(
shareButton.waitForExistence(timeout: 8),
"Month share button should exist"
)
shareButton.tapWhenReady()
let exitButton = app.buttons["Exit"].firstMatch
XCTAssertTrue(
exitButton.waitForExistence(timeout: 5),
"Sharing picker Exit button should appear"
)
// Swipe left to get to the "Stacked Bars" design
app.swipeLeft()
_ = app.waitForExistence(timeout: 1)
let stackedBarsLabel = app.staticTexts["Stacked Bars"].firstMatch
XCTAssertTrue(
stackedBarsLabel.waitForExistence(timeout: 5),
"Stacked Bars design label should be visible after swiping"
)
captureScreenshot(name: "month_share_stacked_bars")
// Close the picker
exitButton.tap()
}
}