kenn-io--agentsview
f99010fae1
CI / lint (push) Failing after 1s
CI / frontend (push) Failing after 1s
CI / scripts (push) Failing after 1s
CI / Go Test (ubuntu-latest) (push) Failing after 0s
CI / frontend-node-25 (push) Failing after 1s
CI / docs (push) Failing after 0s
CI / coverage (push) Failing after 0s
CI / e2e (push) Failing after 0s
Docker / build-and-push (push) Failing after 1s
CI / integration (push) Failing after 4m43s
CI / Go Test (windows-latest) (push) Has been cancelled
CI / Desktop Unit Tests (Windows) (push) Has been cancelled
Desktop Artifacts / Desktop Build (Linux (arm64)) (push) Has been cancelled
Desktop Artifacts / Desktop Build (Linux) (push) Has been cancelled
Desktop Artifacts / Desktop Build (Windows) (push) Has been cancelled
Desktop Artifacts (macOS) / Desktop Build (macOS (aarch64)) (push) Has been cancelled
Desktop Artifacts (macOS) / Desktop Build (macOS (x86_64)) (push) Has been cancelled
74 行
2.4 KiB
TypeScript
74 行
2.4 KiB
TypeScript
import { test, expect } from "@playwright/test";
|
|
import { clickNavTab } from "./helpers/nav";
|
|
|
|
// The fixture session created by createRecentEditsFixture in
|
|
// cmd/testfixture/main.go. It carries an Edit tool call on
|
|
// /src/server/handler.go with FilePath set directly so the feed
|
|
// filter (category IN ('Edit','Write') AND file_path IS NOT NULL)
|
|
// returns a row.
|
|
const FIXTURE_SESSION_ID = "test-session-recent-edits";
|
|
|
|
test.describe("Recent Edits feed", () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto("/");
|
|
await expect(page.locator(".session-item").first()).toBeVisible({
|
|
timeout: 5_000,
|
|
});
|
|
});
|
|
|
|
test("page renders with a file row from fixture data", async ({
|
|
page,
|
|
}) => {
|
|
// Recent Edits is a top-level TopBar tab since the kit-ui migration.
|
|
await clickNavTab(page, "Recent Edits");
|
|
|
|
// The page container and heading should appear.
|
|
await expect(
|
|
page.locator(".recent-edits-page"),
|
|
).toBeVisible({ timeout: 5_000 });
|
|
await expect(
|
|
page.locator(".recent-edits-page h2"),
|
|
).toHaveText("Recent Edits");
|
|
|
|
// Feed must not be empty — the fixture seeds one Edit call.
|
|
await expect(page.locator(".re-empty")).toHaveCount(0);
|
|
await expect(
|
|
page.locator(".re-file-row").first(),
|
|
).toBeVisible({ timeout: 5_000 });
|
|
});
|
|
|
|
test("expand file row and jump to session transcript", async ({
|
|
page,
|
|
}) => {
|
|
// Navigate to Recent Edits via its TopBar tab.
|
|
await clickNavTab(page, "Recent Edits");
|
|
|
|
await expect(
|
|
page.locator(".re-file-row").first(),
|
|
).toBeVisible({ timeout: 5_000 });
|
|
|
|
// Expand the first file row.
|
|
await page.locator(".re-file-row").first().click();
|
|
|
|
// The edits panel should appear with at least one jump button.
|
|
const editsPanel = page.locator(".re-edits").first();
|
|
await expect(editsPanel).toBeVisible({ timeout: 3_000 });
|
|
const editBtn = editsPanel.locator(".re-edit").first();
|
|
await expect(editBtn).toBeVisible();
|
|
|
|
// Click the edit to jump to the session transcript.
|
|
await editBtn.click();
|
|
|
|
// The message list must reflect the fixture session.
|
|
const ml = page.locator(".message-list-scroll");
|
|
await expect(ml).toHaveAttribute(
|
|
"data-session-id",
|
|
FIXTURE_SESSION_ID,
|
|
{ timeout: 5_000 },
|
|
);
|
|
await expect(ml).toHaveAttribute("data-loaded", "true", {
|
|
timeout: 5_000,
|
|
});
|
|
});
|
|
});
|