test: await chat connection creation after agent selection

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Dotta 2026-09-11 16:50:35 -05:00
parent d48ff3368e
commit b639914ecd
1 changed files with 2 additions and 1 deletions

View File

@ -1531,7 +1531,8 @@ test.describe.serial("native chat adapter UI", () => {
).toBeVisible();
await expectSetupRail(page);
await selectMaya(page);
expect(mock.createdWithAgentId).toBe(seed.agentId);
// The selection schedules a request; clicking alone does not await it.
await expect.poll(() => mock.createdWithAgentId).toBe(seed.agentId);
expect(mock.createdWithAgentId).not.toBe(seed.otherAgentId);
await expect(
page.getByRole("button", { name: "Choose an active agent" }),