Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Align History interaction controls with the dated default

pulse-triage[bot]6cf9b197aa0c
diff --git a/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx b/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx
index 054c32aa94..a1f14123aa 100644
--- a/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx
+++ b/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx
@@ -720,7 +720,9 @@ describe('GuestDrawer', () => {
await fireEvent.pointerLeave(plot);
- expect(within(utilizationChart).queryByTestId('guest-history-hover-time')).toBeNull();
+ expect(within(utilizationChart).getByTestId('guest-history-hover-time')).toHaveTextContent(
+ 'Latest stored',
+ );
expect(utilizationChart).toHaveTextContent('20.0%');
expect(utilizationChart).toHaveTextContent('30.0%');
expect(utilizationChart).toHaveTextContent('40.0%');
diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.disk-provenance.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.disk-provenance.test.tsx
index 738585e63a..7ccd2bc3bc 100644
--- a/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.disk-provenance.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.disk-provenance.test.tsx
@@ -249,9 +249,13 @@ describe('GuestDrawerHistory filesystem provenance', () => {
expect.stringContaining('Disk no observation.'),
);
fireEvent.blur(slider);
- expect(utilization().querySelector('[data-history-last-known="disk"]')).toHaveTextContent(
- '50.0%last known',
+ expect(utilization().querySelector('[data-history-last-known="disk"]')).toBeNull();
+ expect(utilization()).toHaveTextContent('Disk-');
+ expect(within(utilization()).getByTestId('guest-history-hover-time')).toHaveAttribute(
+ 'datetime',
+ new Date(end).toISOString(),
);
+ expect(utilization().querySelector('[data-history-deferred="disk"]')).toBeVisible();
});
it('withdraws retained context only with fresh same-source data, without refetch or remount', async () => {
diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.inspection.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.inspection.test.tsx
index 141f4f674e..530ec35222 100644
--- a/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.inspection.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/GuestDrawerHistory.inspection.test.tsx
@@ -188,9 +188,10 @@ describe('GuestDrawerHistory stored-observation inspection', () => {
else setRange('24h');
await waitFor(() => expect(inspect()).toHaveValue('3'));
expect(utilization()).toHaveTextContent('CPU43.0%');
- expect(
- within(utilization()).queryByTestId('guest-history-hover-time'),
- ).not.toBeInTheDocument();
+ const restoredTime = within(utilization()).getByTestId('guest-history-hover-time');
+ expect(restoredTime).toHaveTextContent('Latest stored');
+ expect(restoredTime).toHaveAttribute('datetime', new Date(time + 120_000).toISOString());
+ expect(utilization().querySelectorAll('circle[r="3"]')).toHaveLength(0);
},
);