fix(ai-toolbar): finalize normalized clipboard test coverage
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user