From 709810d41f88281240ef7bcdeed1a1ad2cbfd1c1 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Sun, 26 Jul 2026 23:51:54 -0400 Subject: [PATCH] test: filter the agent combobox before selecting in the UI schedule spec The agent list is Ariakit-virtualized behind a search box, so on an account with more than a screenful of agents the target row is not in the DOM and clicking the option races the renderer. Typing the name first narrows the list to it. Everything else in this spec passed on its first real CI run: Run Now through to a generated conversation, the automatic engine-tick fire (once, then advanced), delete-during-run aborting the generation, and the validation rejection. --- e2e/specs/mock/schedules-execution.spec.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/specs/mock/schedules-execution.spec.ts b/e2e/specs/mock/schedules-execution.spec.ts index 1573da07e5..bf89ed3be5 100644 --- a/e2e/specs/mock/schedules-execution.spec.ts +++ b/e2e/specs/mock/schedules-execution.spec.ts @@ -207,9 +207,12 @@ test.describe('scheduled chat execution', () => { await dialog.locator('#schedule-name').fill(name); await dialog.locator('#schedule-prompt').fill('Daily standup summary'); - // agent_id is required, so the submit stays disabled until one is picked. + // agent_id is required, so the submit stays disabled until one is picked. The list + // is virtualized, so the target row is only in the DOM once the search narrows to + // it — clicking the option directly races the renderer on a populated account. await dialog.getByRole('combobox', { name: 'Agent' }).click(); - await page.getByRole('option', { name: agent.name! }).first().click(); + await page.getByPlaceholder('Search agents by name').fill(agent.name!); + await page.getByRole('option', { name: agent.name!, exact: true }).first().click(); // Weekly rather than the default so the assertion proves the cadence round-tripped // rather than matching whatever the form happened to default to. await dialog.getByRole('group', { name: 'Frequency' }).getByText('Weekly').click();