mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
b7c64d87f3
The Learning pane's button now reads "Copy setup prompt for Learning", because it asks for the Learning tile rather than borrowing the Threads one. Five Playwright specs waited on the old accessible name and timed out. Four of the five belong to Learning. The fifth is the Threads pane: "guides an unavailable Threads runtime through setup instead of showing a dead end" asserts a Rich Threads overview iframe beside the button, and it keeps the Threads label. A blanket rename over the file had taken that one too, and the browser run is what caught it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
53 lines
1.8 KiB
TypeScript
53 lines
1.8 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
for (const transport of ["rest", "single"] as const) {
|
|
test(`restores copied Learning setup over ${transport}`, async ({
|
|
context,
|
|
page,
|
|
}) => {
|
|
await context.grantPermissions(["clipboard-read", "clipboard-write"], {
|
|
origin: "http://127.0.0.1:5177",
|
|
});
|
|
await page.goto(
|
|
`/learning-states.html?state=landing&preserveSetup=true&transport=${transport}`,
|
|
{ waitUntil: "domcontentloaded" },
|
|
);
|
|
await expect(page.locator("html")).toHaveAttribute("data-ready", "true", {
|
|
timeout: 15_000,
|
|
});
|
|
|
|
await page
|
|
.getByRole("button", { name: "Copy setup prompt for Learning" })
|
|
.click();
|
|
|
|
const setup = page.getByRole("region", { name: "Set up Learning" });
|
|
await expect(setup.getByText("1 of 3 steps")).toBeVisible();
|
|
await expect(
|
|
setup.getByRole("heading", { name: "Waiting for Learning setup" }),
|
|
).toBeVisible();
|
|
await expect(
|
|
setup.getByRole("heading", { name: "Copy the setup prompt" }),
|
|
).toBeVisible();
|
|
await expect(setup.locator(".step").first()).toHaveClass(/complete/);
|
|
await expect(
|
|
page.locator('[data-inspector-locked-feature="memory"]'),
|
|
).toHaveCount(0);
|
|
|
|
await page.reload();
|
|
await expect(page.locator("html")).toHaveAttribute("data-ready", "true", {
|
|
timeout: 15_000,
|
|
});
|
|
await expect(setup.getByText("1 of 3 steps")).toBeVisible();
|
|
await expect(
|
|
setup.getByRole("heading", { name: "Waiting for Learning setup" }),
|
|
).toBeVisible();
|
|
await expect(
|
|
setup.getByRole("heading", { name: "Copy the setup prompt" }),
|
|
).toBeVisible();
|
|
await expect(setup.locator(".step").first()).toHaveClass(/complete/);
|
|
await expect(
|
|
page.locator('[data-inspector-locked-feature="memory"]'),
|
|
).toHaveCount(0);
|
|
});
|
|
}
|