Files
Alem Tuzlak 265c1567bf chore(showcase/langgraph-python): Phase 0 cleanup of orphans and dead probes
- delete orphan e2e specs (hitl, interrupt-headless,
  tool-rendering-reasoning-chain)
- rename reasoning-default-render → reasoning-default (route + describe)
- delete dead D5 probes (hitl-steps, interrupt-headless,
  tool-rendering-reasoning-chain)
- update d5-feature-mapping: rename agentic-chat-reasoning →
  reasoning-custom and reasoning-default-render → reasoning-default;
  repoint hitl + hitl-in-chat-booking to hitl-text-input (still used by
  ag2/agno/built-in-agent)
- update d5-registry: drop hitl-steps, interrupt-headless,
  tool-rendering-reasoning-chain feature types
- update d5-reasoning-display preNavigateRoute branch logic and tests
- update probes.test.ts and e2e-deep.test.ts to use surviving feature
  types
2026-05-07 17:18:21 +02:00

43 lines
1.4 KiB
TypeScript

import { test, expect } from "@playwright/test";
// QA reference: qa/reasoning-default.md
// Demo source: src/app/demos/reasoning-default/page.tsx
//
// This cell does NOT override the `reasoningMessage` slot. CopilotKit's
// built-in `CopilotChatReasoningMessage` renders the reasoning as a
// collapsible card. The page exposes a "Show reasoning" suggestion pill
// whose message matches the aimock fixture in showcase/aimock/d5-all.json,
// so streaming is deterministic in CI.
test.describe("Reasoning: Default", () => {
test.setTimeout(120_000);
test.beforeEach(async ({ page }) => {
await page.goto("/demos/reasoning-default");
});
test("page renders without errors", async ({ page }) => {
await expect(
page.locator('[data-testid="copilot-chat-input"]'),
).toBeVisible();
});
test("Show reasoning pill renders a reasoning-role message", async ({
page,
}) => {
const pill = page.getByRole("button", { name: /Show reasoning/i }).first();
await expect(pill).toBeVisible({ timeout: 30_000 });
await pill.click();
// The cell uses CopilotKit's default CopilotChatReasoningMessage. We
// accept either its testid or the role-attribute marker — whichever
// the runtime emits first.
const reasoningRole = page
.locator(
'[data-testid="copilot-reasoning-message"], [data-message-role="reasoning"]',
)
.first();
await expect(reasoningRole).toBeVisible({ timeout: 60_000 });
});
});