Files
copilotkit__copilotkit/showcase/integrations/langgraph-fastapi/tests/e2e/threadid-frontend-tool-roundtrip.spec.ts
Jordan Ritter 28fee3dadf test(showcase): add 5 missing canonical e2e specs to baseline integrations
The 9 baseline integrations (ag2, agno, crewai-crews, langgraph-fastapi,
langroid, llamaindex, mastra, spring-ai, strands) were page-mirrored from
langgraph-python but the mirror omitted 5 LGP-canonical Playwright specs
whose demos are present on disk:

  - declarative-hashbrown
  - declarative-json-render
  - reasoning-custom
  - reasoning-default
  - threadid-frontend-tool-roundtrip

Copied each spec verbatim (byte-identical) from langgraph-python, which the
baselines mirror. All 5 backing demo directories exist in every baseline.
The specs are framework-agnostic (navigate by route + testid), so no
per-integration edits are needed. Restores apples-to-apples spec parity.
2026-05-31 20:25:57 -07:00

28 lines
1.1 KiB
TypeScript

import { test, expect } from "@playwright/test";
// QA reference: qa/threadid-frontend-tool-roundtrip.md
// Demo source: src/app/demos/threadid-frontend-tool-roundtrip/page.tsx
//
// The source-level regression for ENT-658 lives in react-core. This smoke keeps
// the showcase demo route and generated-thread toggle covered without depending
// on fixture-driven tool execution in the standalone showcase package.
test.describe("Thread ID frontend-tool round trip", () => {
test.beforeEach(async ({ page }) => {
await page.goto("/demos/threadid-frontend-tool-roundtrip");
});
test("page loads with generated-thread mode selected", async ({ page }) => {
await expect(page.getByPlaceholder("Type a message")).toBeVisible();
await expect(page.getByLabel("Explicit threadId")).not.toBeChecked();
await expect(page.getByTestId("ent-658-thread-mode")).toHaveText(
/SDK-generated thread/i,
);
await page.getByLabel("Explicit threadId").check();
await expect(page.getByTestId("ent-658-thread-mode")).toHaveText(
/explicit thread/i,
);
});
});