Add XCUITest authoring docs and templates
This commit is contained in:
27
AGENTS.md
Normal file
27
AGENTS.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# SportsTime Agent Notes
|
||||
|
||||
This file is for AI/code agents working in this repo.
|
||||
|
||||
## UI Test Docs
|
||||
|
||||
- Start with `XCUITest-Authoring.md`.
|
||||
- Use `XCUITestSuiteTemplate.swift` when creating new suites.
|
||||
- Use `uiTestPrompt.md` when asking an agent to add/fix UI tests.
|
||||
|
||||
## UI Test Ground Rules
|
||||
|
||||
- Keep new UI tests in `SportsTimeUITests/Tests/`.
|
||||
- Reuse page objects in `SportsTimeUITests/Framework/Screens.swift`.
|
||||
- Reuse shared setup and helpers from `SportsTimeUITests/Framework/BaseUITestCase.swift`.
|
||||
- Reuse high-level flows from `TestFlows` before adding duplicate test steps.
|
||||
- Prefer robust waits (`waitForExistenceOrFail`, `waitUntilHittable`) over sleeps.
|
||||
- Use existing accessibility identifiers (`wizard.*`, `tripOptions.*`, `tripDetail.*`, etc.).
|
||||
- Capture screenshots for key checkpoints in longer end-to-end tests.
|
||||
|
||||
## Before Merging UI Test Changes
|
||||
|
||||
- Run the touched test class.
|
||||
- Run full UI suite:
|
||||
- `xcodebuild test-without-building -project SportsTime.xcodeproj -scheme SportsTime -destination 'platform=iOS Simulator,name=iPhone 17,OS=26.2' -parallel-testing-enabled NO -only-testing:SportsTimeUITests`
|
||||
- Run full scheme verification if behavior touched shared flows:
|
||||
- `xcodebuild test-without-building -project SportsTime.xcodeproj -scheme SportsTime -destination 'platform=iOS Simulator,name=iPhone 17,OS=26.2' -parallel-testing-enabled NO`
|
||||
Reference in New Issue
Block a user