fix(ai-toolbar): finalize normalized clipboard test coverage

This commit is contained in:
2026-04-23 10:38:35 -04:00
parent 251520fd29
commit 71e4133d57
4 changed files with 40 additions and 27 deletions

View File

@@ -8,6 +8,12 @@ import {
registerAIToolbarMarkupHooks();
const makeEvent = (id = "event-1") => ({
id,
title: "Event",
start: "2026-04-22T09:00:00.000Z",
});
describe("AI toolbar state rendering", () => {
test("unauthenticated users see the sign-in-required callout", async () => {
const markup = await renderToolbarMarkup({ isAuthenticated: false });
@@ -66,7 +72,7 @@ describe("AI toolbar state rendering", () => {
test("Summarize only appears when there are events to summarize", async () => {
const emptyMarkup = await renderToolbarMarkup({ events: [] });
const populatedMarkup = await renderToolbarMarkup({
events: [{ id: "event-1" }],
events: [makeEvent()],
});
expect(emptyMarkup).not.toContain("Summarize");
@@ -138,7 +144,7 @@ describe("AI toolbar state rendering", () => {
test("Summarize button calls onAiSummarize when events are present", async () => {
const onAiSummarizeMock = mock();
const actions = await renderToolbarActionBoundary({
events: [{ id: "event-1" }],
events: [makeEvent()],
onAiSummarize: onAiSummarizeMock,
});