Refactor ZStack layouts to .background(), add Year View accessibility IDs, triage QA test plan
Replace ZStack-with-gradient patterns with idiomatic .background() modifier across onboarding, customize, and settings views. Add accessibility identifiers to Year View charts for UI test automation. Mark 67 impossible-to-automate tests RED in QA plan and scaffold initial Year View and Settings onboarding tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
48
Tests iOS/SettingsOnboardingTests.swift
Normal file
48
Tests iOS/SettingsOnboardingTests.swift
Normal file
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// SettingsOnboardingTests.swift
|
||||
// Tests iOS
|
||||
//
|
||||
// TC-124: Show onboarding from Settings.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class SettingsOnboardingTests: BaseUITestCase {
|
||||
override var seedFixture: String? { "empty" }
|
||||
override var bypassSubscription: Bool { true }
|
||||
|
||||
/// TC-124: Tapping Show Onboarding in Settings replays the onboarding flow.
|
||||
func testSettings_ShowOnboarding_OpensOnboardingFlow() {
|
||||
let tabBar = TabBarScreen(app: app)
|
||||
let settingsScreen = tabBar.tapSettings()
|
||||
settingsScreen.assertVisible()
|
||||
|
||||
// Switch to the Settings sub-tab (not Customize)
|
||||
settingsScreen.tapSettingsTab()
|
||||
|
||||
captureScreenshot(name: "settings_before_show_onboarding")
|
||||
|
||||
// Scroll to and tap "Show Onboarding" button
|
||||
let showOnboardingBtn = app.element("settings_show_onboarding")
|
||||
guard showOnboardingBtn.waitForExistence(timeout: 2) ||
|
||||
app.swipeUntilExists(showOnboardingBtn, direction: .up, maxSwipes: 8) else {
|
||||
captureScreenshot(name: "settings_show_onboarding_not_found")
|
||||
XCTFail("Show Onboarding button not found in Settings")
|
||||
return
|
||||
}
|
||||
showOnboardingBtn.tapWhenReady()
|
||||
|
||||
// The sheet may take a moment to animate in.
|
||||
// Look for the onboarding welcome screen or any text unique to onboarding.
|
||||
let welcomeScreen = app.element(UITestID.Onboarding.welcome)
|
||||
let welcomeText = app.staticTexts["Welcome to Feels"]
|
||||
let found = welcomeScreen.waitForExistence(timeout: 8) ||
|
||||
welcomeText.waitForExistence(timeout: 3)
|
||||
|
||||
captureScreenshot(name: "settings_show_onboarding_result")
|
||||
|
||||
XCTAssertTrue(found,
|
||||
"Onboarding should appear after tapping Show Onboarding"
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user