Skip to content

Commit 9a0de6e

Browse files
authored
QA: Document SwiftUI Toggle tap behavior for automation (#516)
- Add guidance to RULES.md about tapping Toggle controls in custom rows - Update test 08 (Lock Conversation) with specific instructions for the lock toggle SwiftUI Toggles inside custom row views (like FeatureRowItem) have accessibility identifiers on the row element, but tapping the center doesn't activate the toggle. The switch control itself must be tapped directly (right side of the row).
1 parent d422b19 commit 9a0de6e

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

qa/RULES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ $CXDB finish-test "$TR" "pass"
217217
### Interacting with the App
218218

219219
- **Use `sim_tap_id` to tap elements** — pass the accessibility identifier or label text. Do not manually look up coordinates and call `sim_ui_tap` unless there is no identifier available.
220+
- **SwiftUI Toggle controls require direct taps on the switch.** Toggles inside custom row views (like `FeatureRowItem`) have accessibility identifiers on the row, but tapping the center of the row may not activate the toggle. Instead, tap the right edge of the row where the switch control is located. If `sim_tap_id` doesn't work, use `sim_ui_tap` with coordinates offset to the right side (x + ~100-150 from center).
220221
- **Use `sim_type_in_field` to enter text** — pass the text field's accessibility identifier and the text to type. Do not manually tap then type.
221222
- **Use `sim_wait_for_element` after navigation or network actions** — it polls until the element appears, avoiding manual sleep + screenshot loops.
222223
- **Use `sim_find_elements` to check what's on screen** — search by pattern or list all identifiable elements. More targeted than `sim_ui_describe_all`.

qa/cxdb/qa.db

Whitespace-only changes.

qa/tests/08-lock-conversation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ After the app joins, generate a new invite URL from the CLI. Save this URL for t
2020
1. In the app, open the conversation and verify no lock icon appears in the toolbar.
2121
2. Open conversation info and verify the lock toggle is off.
2222

23+
**Note:** The lock toggle is inside a custom row view. Tapping the center of the row (via `sim_tap_id`) may not activate the toggle — it opens a confirmation sheet when you tap directly on the switch control itself (right side of the row). Use `sim_ui_tap` with x-coordinate offset to the right, or tap directly on the switch at approximately `x: row_center_x + 100`.
24+
2325
### Generate an invite before locking
2426

2527
3. Use the CLI to generate an invite. Save the invite URL.

0 commit comments

Comments
 (0)