test(e2e/agents): add composer spec for Validation #6

Type a message, send; assert the user_message bubble count strictly
grows. Mock provider acks the user_message synchronously — that's
enough to verify the composer plumbing without Epic A.
This commit is contained in:
Ishaan Jaffer 2026-05-06 15:09:27 -07:00
parent 36ac39d3af
commit fac72a5362
No known key found for this signature in database

View file

@ -0,0 +1,26 @@
/**
* LIT-2881 Validation #6 Followup composer.
*
* Type message + send. user_message bubble appears (mock provider).
* (assistant_message follows in real proxy mode; the mock client only
* acks the user_message synchronously, which is enough to verify the
* composer plumbing.)
*/
import { test, expect } from "@playwright/test";
import { AGENTS_DEV_URL, authenticateAgentsPage } from "./_helpers";
test("composer send surfaces a user_message in the conversation pane", async ({ page }) => {
await authenticateAgentsPage(page);
await page.goto(`${AGENTS_DEV_URL}/agents/agt_01/sessions/ses_01`);
await expect(page.getByTestId("composer")).toBeVisible();
const userBubblesBefore = await page.getByTestId("message-bubble-user").count();
await page.getByTestId("composer-input").fill("ping from e2e");
await page.getByTestId("composer-send").click();
// user_message bubble count strictly grows
await expect
.poll(async () => page.getByTestId("message-bubble-user").count(), { timeout: 5_000 })
.toBeGreaterThan(userBubblesBefore);
});