Add XCUITest authoring docs and reusable prompt template

This commit is contained in:
Trey t
2026-02-18 09:00:28 -06:00
parent 56ac783219
commit b58dfd5093
6 changed files with 262 additions and 29 deletions

26
AGENTS.md Normal file
View File

@@ -0,0 +1,26 @@
# Feels Agent Instructions
## XCUITest Workflows (Required)
When a user asks to add or update iOS UI tests, follow this order:
1. Read `/Users/treyt/Desktop/code/Feels/docs/XCUITest-Authoring.md`.
2. Use the existing test foundation (`BaseUITestCase`, `WaitHelpers`, screen objects).
3. Prefer adding/updating accessibility IDs in app code first, then consume those IDs in tests.
4. Run the affected suite with `-only-testing` and report pass/fail.
5. If behavior changes broadly, run the full `Tests iOS` suite.
## Hard Rules For UI Tests
- Do not use `sleep(...)`.
- Do not use raw text selectors as the primary selector.
- Use `UITestID` + screen objects from `Tests iOS/Screens/`.
- Keep tests deterministic via fixtures and launch flags from `BaseUITestCase`.
- Put new suites in `Tests iOS/` and name files `{Feature}Tests.swift`.
## Primary References
- Guide: `/Users/treyt/Desktop/code/Feels/docs/XCUITest-Authoring.md`
- Template: `/Users/treyt/Desktop/code/Feels/docs/templates/XCUITestSuiteTemplate.swift`
- Foundation helper: `/Users/treyt/Desktop/code/Feels/Tests iOS/Helpers/BaseUITestCase.swift`
- Wait/ID helper: `/Users/treyt/Desktop/code/Feels/Tests iOS/Helpers/WaitHelpers.swift`