Add XCUITest authoring docs and templates

This commit is contained in:
treyt
2026-02-18 13:24:46 -06:00
parent 20ac1a7e59
commit 7e54ff2ef2
6 changed files with 252 additions and 1 deletions

View File

@@ -0,0 +1,48 @@
//
// __FeatureName__Tests.swift
// SportsTimeUITests
//
// Copy this file into SportsTimeUITests/Tests and rename placeholders.
//
import XCTest
final class __FeatureName__Tests: BaseUITestCase {
// MARK: - Helpers
@MainActor
private func openHome() -> HomeScreen {
let home = HomeScreen(app: app)
home.waitForLoad()
return home
}
@MainActor
private func openWizard() -> TripWizardScreen {
let home = openHome()
home.tapStartPlanning()
let wizard = TripWizardScreen(app: app)
wizard.waitForLoad()
return wizard
}
// MARK: - Tests
/// Replace with test case ID and behavior, e.g. F-200.
@MainActor
func testF___BehaviorName() {
let wizard = openWizard()
wizard.selectDateRangeMode()
// Add scenario actions
// wizard.selectSport("mlb")
// wizard.selectRegion("central")
// Add assertions
XCTAssertTrue(wizard.planTripButton.exists, "Plan button should be visible")
captureScreenshot(named: "F___-BehaviorName")
}
}