fix(webui): clarify automation search placeholder

This commit is contained in:
chengyongru
2026-06-16 09:48:53 +08:00
parent f56a73b2d3
commit 23e12b84ff
11 changed files with 25 additions and 22 deletions
+3 -3
View File
@@ -454,13 +454,13 @@ describe("App layout", () => {
expect(document.title).toBe("Automations · nanobot");
const searchInput = within(automationsMain as HTMLElement).getByPlaceholderText(
"name:quiz chat:WeChat cron:09-23",
"Search task, message, linked chat, or schedule",
);
fireEvent.change(searchInput, { target: { value: "chat:WeChat" } });
fireEvent.change(searchInput, { target: { value: "WeChat" } });
await waitFor(() => expect(screen.queryByText("Daily repo check")).not.toBeInTheDocument());
expect(screen.getAllByText("WeChat quiz").length).toBeGreaterThanOrEqual(1);
fireEvent.change(searchInput, { target: { value: "cron:09-23" } });
fireEvent.change(searchInput, { target: { value: "09-23" } });
await waitFor(() => expect(screen.queryByText("Daily repo check")).not.toBeInTheDocument());
expect(screen.getAllByText("WeChat quiz").length).toBeGreaterThanOrEqual(1);
});