Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions frontend/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.3",
"globals": "^17.8.0",
"jsdom": "^29.1.1",
"jsdom": "^30.0.1",
"msw": "^2.15.0",
"react-doctor": "^0.9.2",
"shadcn": "^4.16.1",
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/components/donut-chart.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,8 @@ describe("DonutChart", () => {
/>,
);

expect(screen.getByTestId("donut-legend-list")).toHaveStyle({
maxHeight: "calc(5 * 1.75rem)",
});
// jsdom 30 simplifies calc() during serialization; authored: calc(5 * 1.75rem)
expect(screen.getByTestId("donut-legend-list").style.maxHeight).toBe("calc(8.75rem)");
});

it("scrolls the hovered pie item into view in the legend list", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ describe("AccountCostDonut", () => {
<AccountCostDonut accountCosts={usage.accountCosts} totalCostUsd={usage.totalCostUsd} />,
);

expect(screen.getByTestId("account-cost-legend-list")).toHaveStyle({
maxHeight: "calc(5 * 1.75rem + 4 * 0rem)",
});
// jsdom 30 simplifies calc() during serialization; authored: calc(5 * 1.75rem + 4 * 0rem)
expect(screen.getByTestId("account-cost-legend-list").style.maxHeight).toBe("calc(8.75rem)");
expect(screen.getByTestId("account-cost-legend-5")).toBeInTheDocument();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ describe("AccountCards", () => {
/>,
);

expect(screen.getByTestId("dashboard-account-cards")).toHaveStyle({
maxHeight: "calc(2 * 11.5rem + 1rem)",
});
// jsdom 30 simplifies calc() during serialization; authored: calc(2 * 11.5rem + 1rem)
expect(screen.getByTestId("dashboard-account-cards").style.maxHeight).toBe("calc(24rem)");
});

it("keeps the scrollbar hidden on the dashboard account grid", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@ describe("ModelDistributionDonut", () => {
/>,
);

expect(screen.getByTestId("model-distribution-legend-list")).toHaveStyle({
maxHeight: "calc(4 * 2rem)",
});
// jsdom 30 simplifies calc() during serialization; authored: calc(4 * 2rem)
expect(screen.getByTestId("model-distribution-legend-list").style.maxHeight).toBe("calc(8rem)");
expect(screen.getByTestId("model-distribution-legend-4")).toBeInTheDocument();
});

Expand Down Expand Up @@ -136,8 +135,9 @@ describe("ModelDistributionDonut", () => {

expect(smallCostLegendValue).toBeDefined();
expect(largeCostLegendValue).toBeDefined();
expect(smallCostLegendValue).toHaveStyle({ minWidth: "7ch" });
expect(largeCostLegendValue).toHaveStyle({ minWidth: "7ch" });
// jsdom 30's getComputedStyle converts lengths to px, so assert the raw inline style
expect(smallCostLegendValue?.style.minWidth).toBe("7ch");
expect(largeCostLegendValue?.style.minWidth).toBe("7ch");
});

it("defaults to cost mode without rendering a donut tooltip", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ describe("UseragentDistributionDonut", () => {
/>,
);

expect(screen.getByTestId("useragent-distribution-legend-list")).toHaveStyle({
maxHeight: "calc(4 * 2rem)",
});
// jsdom 30 simplifies calc() during serialization; authored: calc(4 * 2rem)
expect(screen.getByTestId("useragent-distribution-legend-list").style.maxHeight).toBe("calc(8rem)");
expect(screen.getByTestId("useragent-distribution-legend-4")).toBeInTheDocument();
});

Expand Down Expand Up @@ -177,8 +176,9 @@ describe("UseragentDistributionDonut", () => {

expect(smallRequestLegendValue).toBeDefined();
expect(largeRequestLegendValue).toBeDefined();
expect(smallRequestLegendValue).toHaveStyle({ minWidth: "4ch" });
expect(largeRequestLegendValue).toHaveStyle({ minWidth: "4ch" });
// jsdom 30's getComputedStyle converts lengths to px, so assert the raw inline style
expect(smallRequestLegendValue?.style.minWidth).toBe("4ch");
expect(largeRequestLegendValue?.style.minWidth).toBe("4ch");
});

it("defaults to cost mode without rendering a donut tooltip", () => {
Expand Down
Loading