Avatar Customization + Update Agent Brain (#23)
Co-authored-by: iamlukethedev <iamlukethedev@users.noreply.github.com>
This commit is contained in:
@@ -1,34 +1,23 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { createDefaultAgentAvatarProfile } from "@/lib/avatars/profile";
|
||||
import { stubStudioRoute } from "./helpers/studioRoute";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.route("**/api/studio", async (route, request) => {
|
||||
if (request.method() === "PUT") {
|
||||
await route.fulfill({
|
||||
status: 200,
|
||||
contentType: "application/json",
|
||||
body: JSON.stringify({
|
||||
settings: { version: 1, gateway: null, focused: {}, avatars: {} },
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (request.method() !== "GET") {
|
||||
await route.fallback();
|
||||
return;
|
||||
}
|
||||
await route.fulfill({
|
||||
status: 200,
|
||||
contentType: "application/json",
|
||||
body: JSON.stringify({
|
||||
settings: { version: 1, gateway: null, focused: {}, avatars: {} },
|
||||
}),
|
||||
});
|
||||
await stubStudioRoute(page, {
|
||||
version: 1,
|
||||
gateway: null,
|
||||
focused: {},
|
||||
avatars: {
|
||||
"ws://localhost:18789": {
|
||||
"agent-1": createDefaultAgentAvatarProfile("seed-1"),
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test("empty focused view shows zero agents when disconnected", async ({ page }) => {
|
||||
test("structured avatar settings fixture does not break focused load", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
|
||||
await expect(page.getByTestId("studio-menu-toggle")).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Connect" }).first()).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Open headquarters sidebar" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "CHAT" })).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user