contacts: wait for editor in photo-pick-cancelled test
- Commit
e2f03a620d4fe7217b2a2bc687acdb13efad496b- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-17 02:44 UTC (19 days ago)
- Parents
c455ac9
photoPickCancelledStaysOnEditor asserted the editor title at waitForIdle; under load the editor can compose after that instant, so the assert read a not-yet-composed screen. Wait until Add contact/Save is observed before clicking Add picture and asserting. Product behaviour unchanged. Verified: TZ=UTC EditPageBranchesW5Test green.
Diff
contacts/src/test/java/com/vayunmathur/contacts/ui/EditPageBranchesW5Test.kt
diff --git a/contacts/src/test/java/com/vayunmathur/contacts/ui/EditPageBranchesW5Test.kt b/contacts/src/test/java/com/vayunmathur/contacts/ui/EditPageBranchesW5Test.ktindex ab8721f35c..1007362ab6 100644--- a/contacts/src/test/java/com/vayunmathur/contacts/ui/EditPageBranchesW5Test.kt+++ b/contacts/src/test/java/com/vayunmathur/contacts/ui/EditPageBranchesW5Test.kt@@ -142,7 +142,9 @@ class EditPageBranchesW5Test { } } }- rule.waitForIdle()+ // Wait until the editor itself is observed, not just idle: under+ // load composition of the editor can lag the first waitForIdle.+ rule.waitUntil(20_000) { exists("Add contact") || exists("Save") } val addPhoto = rule.onAllNodesWithText("Add picture", substring = true) if (addPhoto.fetchSemanticsNodes().isNotEmpty()) { addPhoto[0].performClick()