OpenAI-compatible client with mock fallback, tool-calling loop, and /assistant UI. Tools map to /api/v1/ endpoints per ADR 0006 direct-tools decision.
14 lines
541 B
TypeScript
14 lines
541 B
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
test("assistant chat smoke", async ({ page }) => {
|
|
await page.goto("/assistant");
|
|
await expect(page.getByRole("heading", { name: "Assistant" })).toBeVisible();
|
|
|
|
await page.getByLabel("Message").fill("hello assistant");
|
|
await page.getByRole("button", { name: "Send" }).click();
|
|
|
|
await expect(page.getByText("You")).toBeVisible();
|
|
await expect(page.getByText("hello assistant")).toBeVisible();
|
|
await expect(page.getByText("Assistant", { exact: true }).nth(1)).toBeVisible();
|
|
});
|