Add 3 passing UI tests (batch 3): deep links and trial expiration

TC-125: feels://subscribe deep link opens subscription view
TC-126: Malformed deep link (feels://invalidpath) does not crash
TC-078: Trial expired state shows "Trial expired" banner in Settings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-20 10:05:45 -06:00
parent 599e54aa72
commit f83c52fb42
4 changed files with 115 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
//
// TrialExpirationTests.swift
// Tests iOS
//
// TC-078: Trial expiration state is reflected in the UI.
//
import XCTest
final class TrialExpirationTests: BaseUITestCase {
override var seedFixture: String? { "empty" }
override var bypassSubscription: Bool { false }
override var expireTrial: Bool { true }
/// TC-078: When trial is expired, Settings shows "Trial expired" text
/// and the upgrade banner is visible.
func testTrialExpired_ShowsExpiredBanner() {
let tabBar = TabBarScreen(app: app)
let settingsScreen = tabBar.tapSettings()
settingsScreen.assertVisible()
// Verify upgrade banner is visible (trial expired, not subscribed)
settingsScreen.assertUpgradeBannerVisible()
// Check for "Trial expired" text in the banner
let expiredText = app.staticTexts["Trial expired"]
XCTAssertTrue(
expiredText.waitForExistence(timeout: 5),
"Settings should show 'Trial expired' text when trial has expired"
)
captureScreenshot(name: "trial_expired_banner")
}
}