From 1aaf0bec3ec0a888930f0192aa1c7bdf39673030 Mon Sep 17 00:00:00 2001 From: Eli Date: Wed, 16 Sep 2026 22:35:19 -0500 Subject: [PATCH] test(desktop): scope same-persona agent count to the members panel The fork's "Your team" sidebar roster lists every managed agent, so a page-wide getByText("Pinky") count sees the two roster rows as well as the members list + search hit and reads 4 instead of 2. Count inside members-sidebar (the assertion's real subject) and assert the roster rows explicitly so the fork behavior is documented, not hidden. Signed-off-by: Eli --- desktop/tests/e2e/channels.spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/desktop/tests/e2e/channels.spec.ts b/desktop/tests/e2e/channels.spec.ts index 1797def2622..a7ed00be4a1 100644 --- a/desktop/tests/e2e/channels.spec.ts +++ b/desktop/tests/e2e/channels.spec.ts @@ -4792,7 +4792,15 @@ test("members sidebar retains distinct same-persona managed agents", async ({ await expect( page.getByTestId(`channel-user-search-result-${outOfChannelAgentPubkey}`), ).toBeVisible(); - await expect(page.getByText("Pinky", { exact: true })).toHaveCount(2); + // Members panel: the in-channel agent in the list + the out-of-channel one + // as a search hit. The sidebar's "Your team" roster lists every managed + // agent too, so the count is scoped to the panel rather than the page. + await expect( + page.getByTestId("members-sidebar").getByText("Pinky", { exact: true }), + ).toHaveCount(2); + await expect( + page.getByTestId("sidebar-team-roster").getByText("Pinky", { exact: true }), + ).toHaveCount(2); }); test("private-channel members can add people and managed agents without admin", async ({