From a44624cfad128ad2af746618d185741694ed77bb Mon Sep 17 00:00:00 2001 From: Paul Hitt Date: Mon, 28 Sep 2026 07:52:51 -0400 Subject: [PATCH] Find the new group by its hex id, not by a number aGroupIsCreatedAndListed waited for a row matching `group-\d+`. The relay mints group ids with randomHexToken(), so the tag is `group-` plus 64 hex characters, and the pattern only matched when the id happened to start with a digit: ten times in sixteen. The rest of the time the test failed with "the group never appeared in the list after Create" while the dump showed the group in the list ("Test Crew, peer96035270, You", tag group-eea4ceeb...). Now `group-[0-9a-f]{16,}`, which matches that tag and still not `group-name` or `group-member-N`. Checked both patterns against the tag from the failing run: old no match, new match. On device: passes. The keyboard was ruled out first: with it fully open (top at y=1517) the member row and Create sat at y=1201-1377, above it. Co-Authored-By: Claude Opus 5.5 --- .../kotlin/io/flamenet/messenger/app/FeatureUseTest.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/androidTest/kotlin/io/flamenet/messenger/app/FeatureUseTest.kt b/app/src/androidTest/kotlin/io/flamenet/messenger/app/FeatureUseTest.kt index 1be7171..60e2bf3 100644 --- a/app/src/androidTest/kotlin/io/flamenet/messenger/app/FeatureUseTest.kt +++ b/app/src/androidTest/kotlin/io/flamenet/messenger/app/FeatureUseTest.kt @@ -130,8 +130,13 @@ class FeatureUseTest { compose.onNodeWithTag("create-group").performClick() // The group list carries a `group-` row once the relay answers. + // The id is the relay's randomHexToken(), not a number. Matching + // `group-\d+` only worked when the hex happened to start with a digit, + // ten times in sixteen, so the test failed a third of the time on a + // group that was plainly there. Sixteen or more hex characters keeps + // `group-name` and `group-member-N` from matching instead. awaitNodeMatching( - Regex("group-\\d+"), + Regex("group-[0-9a-f]{16,}"), 150_000, "the group never appeared in the list after Create", )