From cca21dcc2cf61720faf80723ab87e21fd397024b Mon Sep 17 00:00:00 2001 From: rcourtman <8825017+rcourtman@users.noreply.github.com> Date: Wed, 14 Oct 2026 00:13:30 +0100 Subject: [PATCH] Stub the history chart in the guest physical disk test The expanded disk detail now shows its history charts in view, so this test mounted HistoryChart, which measures itself with ResizeObserver. jsdom has none, and the unhandled error failed the frontend job even though every test passed. Chart rendering stays covered by the HistoryChart and DiskDetail suites. --- .../Workloads/__tests__/GuestPhysicalDisks.test.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestPhysicalDisks.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestPhysicalDisks.test.tsx index b29495882f..961f6e2b4b 100644 --- a/frontend-modern/src/components/Workloads/__tests__/GuestPhysicalDisks.test.tsx +++ b/frontend-modern/src/components/Workloads/__tests__/GuestPhysicalDisks.test.tsx @@ -1,5 +1,5 @@ import { cleanup, fireEvent, render, screen, waitFor, within } from '@solidjs/testing-library'; -import { createSignal } from 'solid-js'; +import { createSignal, type JSX } from 'solid-js'; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'; import { AlertsAPI } from '@/api/alerts'; import { useAlertsActivation } from '@/stores/alertsActivation'; @@ -17,6 +17,14 @@ const queryState = vi.hoisted(() => ({ enabled: false, })); +// The expanded disk detail now shows its history charts in view; the chart +// measures itself with ResizeObserver, which jsdom lacks. Its rendering is +// covered by the HistoryChart and DiskDetail suites. +vi.mock('@/components/shared/HistoryChart', () => ({ + HistoryChartHoverGroup: (props: { children: JSX.Element }) =>