feat(webui): match session handles in Ctrl+K
This commit is contained in:
1 parent
e821144c7e
commit
d14c54c31c
4 files changed
+32
-1
No files matched your search
@@ -8,6 +8,7 @@ import type { ChatSummary } from "@/lib/types";
|
||||
const sessions: ChatSummary[] = Array.from({ length: 1000 }, (_, index) => ({
|
||||
key: `websocket:topic-${index}`, chatId: `topic-${index}`, channel: "websocket",
|
||||
title: `Topic ${index}`, preview: `Preview ${index}`, createdAt: null, updatedAt: null,
|
||||
...(index === 1 ? { handle: { id: "handle_00000000000000000000000000000001", name: "betu" } } : {}),
|
||||
}));
|
||||
|
||||
export function LoadedSessionSearchFixture() {
|
||||
|
||||
@@ -13,6 +13,12 @@ for (const viewport of [{ width: 1280, height: 800 }, { width: 390, height: 844
|
||||
const dialog = page.getByRole("dialog", { name: "Search", exact: true });
|
||||
const input = dialog.getByRole("textbox", { name: "Search", exact: true });
|
||||
await expect(dialog.getByRole("button")).toHaveCount(24);
|
||||
for (const query of ["@betu", "betu", "@BETU", "@be"]) {
|
||||
await input.fill(query);
|
||||
await expect(dialog.getByRole("button")).toHaveCount(1);
|
||||
await expect(dialog.getByText("Topic 1", { exact: true })).toBeVisible();
|
||||
await expect(dialog.getByText("Preview 1", { exact: true })).toBeVisible();
|
||||
}
|
||||
for (const query of ["权限", "full access", "25%", "session_history.py"]) {
|
||||
await input.fill(query);
|
||||
await expect(dialog.getByRole("button")).toHaveCount(1);
|
||||
|
||||
Reference in new issue
Block a user