The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Stub floating-ui positioning in unit tests (#82493)
Nemanja Glumac2980fd7f2971
diff --git a/frontend/test/jest-setup-env.js b/frontend/test/jest-setup-env.jsindex eb391e474f8..0f23b20d42d 100644--- a/frontend/test/jest-setup-env.js+++ b/frontend/test/jest-setup-env.js@@ -2,6 +2,24 @@ import "@testing-library/jest-dom";import { cleanup } from "@testing-library/react";import fetchMock from "fetch-mock";+// jsdom has no layout, so popover positioning computes nothing useful while+// costing getComputedStyle calls and an extra re-render per position update.+jest.mock("@floating-ui/dom", () => ({+ ...jest.requireActual("@floating-ui/dom"),+ computePosition: (_reference, _floating, options = {}) =>+ Promise.resolve({+ x: 0,+ y: 0,+ placement: options.placement ?? "bottom",+ strategy: options.strategy ?? "absolute",+ middlewareData: {},+ }),+ autoUpdate: (_reference, _floating, update) => {+ update();+ return () => {};+ },+}));+// Mock clipboard API for testsObject.assign(navigator, {clipboard: {