Merge branch 'main' into fix/chat-sessions-multi-project-scope-clean

This commit is contained in:
gsxdsm
2026-05-25 13:28:29 -07:00
committed by GitHub
414 changed files with 19347 additions and 3425 deletions

View File

@@ -1,5 +1,36 @@
# @fusion-plugin-examples/reports
## 0.1.12
### Patch Changes
- Updated dependencies [60a0012]
- Updated dependencies [a10fc56]
- Updated dependencies [de67c51]
- Updated dependencies [6e7f1e5]
- Updated dependencies [5d35b64]
- Updated dependencies [408e20b]
- Updated dependencies [4f38ed1]
- Updated dependencies [ec6643e]
- Updated dependencies [85786e7]
- Updated dependencies [ef12df4]
- Updated dependencies [d5cfa92]
- Updated dependencies [916047c]
- Updated dependencies [084bdc6]
- Updated dependencies [a201f56]
- Updated dependencies [d8493f9]
- Updated dependencies [99359b6]
- Updated dependencies [6083de2]
- Updated dependencies [4c31e88]
- Updated dependencies [dc94494]
- Updated dependencies [e138289]
- Updated dependencies [76429a8]
- Updated dependencies [ed4d021]
- Updated dependencies [51fc826]
- @fusion/dashboard@0.33.0
- @fusion/core@0.33.0
- @fusion/plugin-sdk@0.33.0
## 0.1.11
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@fusion-plugin-examples/reports",
"version": "0.1.11",
"version": "0.1.12",
"type": "module",
"description": "Reports plugin for Fusion",
"private": true,

View File

@@ -3,6 +3,21 @@ import { describe, expect, it, vi } from "vitest";
import * as reportsHook from "../useReports.js";
import { ReportsView } from "../ReportsView.js";
// ReportDetailPanel transitively calls useReportPreview → fetch(), and jsdom
// has no fetch. The rejection lands after teardown and React's state update
// then references `window`, surfacing as an unhandled error that fails the
// suite. Stub the preview API to resolve synchronously.
vi.mock("../api.js", () => ({
listReports: vi.fn().mockResolvedValue([]),
getReport: vi.fn().mockResolvedValue(null),
getReportPreviewHtml: vi.fn().mockResolvedValue(""),
getReportExportUrl: vi.fn().mockReturnValue(""),
approveReport: vi.fn().mockResolvedValue(null),
rejectReport: vi.fn().mockResolvedValue(null),
publishReport: vi.fn().mockResolvedValue(null),
getShareBlocks: vi.fn().mockResolvedValue({}),
}));
describe("ReportsView", () => {
it("renders list and compare toggle", () => {
vi.spyOn(reportsHook, "useReports").mockReturnValue({

View File

@@ -1,5 +1,13 @@
import "@testing-library/jest-dom/vitest";
import { vi } from "vitest";
import { cleanup } from "@testing-library/react";
import { afterEach, vi } from "vitest";
// @testing-library/react only auto-registers cleanup when vitest globals are
// enabled. We don't enable globals here, so we wire it manually — otherwise
// React leaves the test tree mounted, its scheduler fires a deferred update
// via setImmediate after the jsdom environment is torn down, and the suite
// fails with "ReferenceError: window is not defined".
afterEach(() => cleanup());
if (typeof window !== "undefined") {
Object.defineProperty(window, "matchMedia", {