test: align automation integration coverage with current behavior

This commit is contained in:
chengyongru authored and chengyongru committed 2026-09-13 05:43:05 +08:00
1 parent 458b925f86
commit bfb4f021ed
4 files changed
+42 -16

No files matched your search

@@ -33,6 +33,7 @@ describe("Automation run response", () => {
expect(screen.queryByText("This record doesn’t include the response text.")).not.toBeInTheDocument();
expect(fetchResult).toHaveBeenCalledWith("test-token", "reminder", 1000, "cron", expect.any(AbortSignal));
await act(async () => complete({ response: "**Drink water**" }));
await act(async () => { await vi.dynamicImportSettled(); });
expect(await screen.findByText("Drink water")).toBeVisible();
expect(screen.getByText("Drink water").tagName).toBe("STRONG");
expect(screen.queryByText("Current instructions")).not.toBeInTheDocument();