From 576b7de0ada820742dd7a4e5a9848ef838ff52aa Mon Sep 17 00:00:00 2001 From: Dotta Date: Sun, 8 Nov 2026 22:06:43 -0600 Subject: [PATCH] test(evals): open the project access picker without toggling it shut Opening Private project access focuses the person picker, which opens its search panel by itself; the scripted click then closed it. Click only while the panel is still closed, and pick Riley inside that panel. Co-Authored-By: Claude Opus 5.5 --- .../chat-catalog-domains/internal-privacy.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/runner-e2e/chat-catalog-domains/internal-privacy.ts b/tests/runner-e2e/chat-catalog-domains/internal-privacy.ts index 1bcfa02346f..8aa0d5bb391 100644 --- a/tests/runner-e2e/chat-catalog-domains/internal-privacy.ts +++ b/tests/runner-e2e/chat-catalog-domains/internal-privacy.ts @@ -201,9 +201,17 @@ function shareProject(): ChatCatalogCase { await ctx.input.page.getByText("Configuration", { exact: true }).last().click(); await ctx.input.page.getByRole("button", { name: "Manage access", exact: true }).click(); const dialog = ctx.input.page.getByRole("dialog", { name: "Private project access", exact: true }); - await dialog.getByRole("combobox").click(); - await ctx.input.page.getByPlaceholder(/Search people and agents/).last().fill("Riley"); - await ctx.input.page.getByRole("option", { name: /Riley/ }).first().click(); + // Opening the dialog focuses the person picker, which opens its search panel by itself. + // Click the picker only while that panel is still closed; a second click would close it. + const picker = dialog.getByRole("combobox"); + const pickerPanel = ctx.input.page.getByRole("dialog", { name: "Add a person or agent", exact: true }); + const search = pickerPanel.getByPlaceholder("Search people and agents", { exact: true }); + await expect(async () => { + if (!await search.isVisible()) await picker.click(); + await expect(search).toBeVisible({ timeout: 2_000 }); + }).toPass({ timeout: 30_000 }); + await search.fill("Riley"); + await pickerPanel.getByRole("option", { name: /Riley/ }).first().click(); await dialog.getByRole("button", { name: "Add", exact: true }).click(); await pollUntil({ label: "Owner-added Riley project membership", deadlineAt: Date.now() + 30_000, load: () => ctx.input.api.get(`/api/projects/${p.id}/access-members`),