Replace placeholder pages with ToolEmbed component that embeds LangGraph, LangFlow, and Langfuse in iframes when configured, or shows "Not Configured" placeholders when URLs are empty. Add ServiceUrlsContext for passing service URLs through Dioxus context. Add docker-compose services for local development: LangFlow, LangGraph (trial), Langfuse with full dependency stack (Postgres, ClickHouse, Redis, MinIO). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
61 lines
2.0 KiB
TypeScript
61 lines
2.0 KiB
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("Developer section", () => {
|
|
test("agents page loads with sub-nav tabs", async ({ page }) => {
|
|
await page.goto("/developer/agents");
|
|
await page.waitForSelector(".developer-shell", { timeout: 15_000 });
|
|
|
|
const nav = page.locator(".sub-nav");
|
|
await expect(nav.locator("a", { hasText: "Agents" })).toBeVisible();
|
|
await expect(nav.locator("a", { hasText: "Flow" })).toBeVisible();
|
|
await expect(nav.locator("a", { hasText: "Analytics" })).toBeVisible();
|
|
});
|
|
|
|
test("agents page shows Not Configured when URL is empty", async ({
|
|
page,
|
|
}) => {
|
|
await page.goto("/developer/agents");
|
|
await page.waitForSelector(".placeholder-page", { timeout: 15_000 });
|
|
|
|
await expect(page.locator(".placeholder-badge")).toContainText(
|
|
"Not Configured"
|
|
);
|
|
await expect(page.locator("h2")).toContainText("Agent Builder");
|
|
});
|
|
|
|
test("analytics page shows Not Configured when URL is empty", async ({
|
|
page,
|
|
}) => {
|
|
await page.goto("/developer/analytics");
|
|
await page.waitForSelector(".placeholder-page", { timeout: 15_000 });
|
|
|
|
await expect(
|
|
page.locator("h2", { hasText: "Analytics" })
|
|
).toBeVisible();
|
|
await expect(page.locator(".placeholder-badge")).toContainText(
|
|
"Not Configured"
|
|
);
|
|
});
|
|
|
|
test("agents page shows iframe when URL is configured", async ({
|
|
page,
|
|
}) => {
|
|
// This test only runs meaningfully when LANGGRAPH_URL is set in the
|
|
// environment. When empty, the placeholder is shown instead.
|
|
await page.goto("/developer/agents");
|
|
await page.waitForTimeout(2000);
|
|
|
|
const iframe = page.locator(".tool-embed-iframe");
|
|
const placeholder = page.locator(".placeholder-badge");
|
|
|
|
if (await placeholder.isVisible()) {
|
|
await expect(placeholder).toContainText("Not Configured");
|
|
} else {
|
|
await expect(iframe).toBeVisible();
|
|
await expect(
|
|
page.locator(".tool-embed-popout-btn")
|
|
).toBeVisible();
|
|
}
|
|
});
|
|
});
|