mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 12:42:49 +00:00
Align backup chronology controls with observed date evidence
Scope the new warning assertion to its own status rather than unrelated status regions. Preserve exactly-now and window-start activity edges while explicitly rejecting the obsolete future same-day expectation. Contract-Neutral: Test-only fixture and selector corrections; runtime, wire, presentation and subsystem contracts are unchanged. Change-source: pulse-maintainer
This commit is contained in:
@@ -1067,10 +1067,11 @@ describe('backup-date-evidence connected inventory', () => {
|
||||
await waitFor(() =>
|
||||
expect(document.querySelectorAll('[data-proxmox-backup-row="recoverable"]')).toHaveLength(2),
|
||||
);
|
||||
expect(screen.getByRole('status')).toHaveTextContent('remain listed');
|
||||
expect(screen.getByRole('status')).toHaveTextContent(
|
||||
'excluded from the activity chart and day filters',
|
||||
const warning = screen.getByText(
|
||||
/Restore points with unavailable or future dates remain listed/,
|
||||
);
|
||||
expect(warning).toHaveAttribute('role', 'status');
|
||||
expect(warning).toHaveTextContent('excluded from the activity chart and day filters');
|
||||
expect(screen.getByText(/No dated backup activity/)).toBeInTheDocument();
|
||||
const future = [...document.querySelectorAll('[data-proxmox-backup-row="recoverable"]')].find(
|
||||
(row) => row.textContent?.includes('PBS'),
|
||||
|
||||
+5
-1
@@ -179,12 +179,13 @@ describe('proxmoxBackupActivityPresentation', () => {
|
||||
expect(feb10.total).toBe(2);
|
||||
});
|
||||
|
||||
it('includes the window-start edge and excludes anything at or past start-of-tomorrow', () => {
|
||||
it('includes the window-start and exactly-now edges but excludes future activity even within today', () => {
|
||||
const todayStart = localMs(2026, 1, 13);
|
||||
const items: ActivityItem[] = [
|
||||
{ ts: localMs(2026, 1, 6, 23, 59), kind: 'ok' },
|
||||
{ ts: localMs(2026, 1, 7, 0, 0), kind: 'ok' },
|
||||
{ ts: todayStart, kind: 'failed' },
|
||||
{ ts: NOW.getTime(), kind: 'running' },
|
||||
{ ts: todayStart + DAY_MS - 1, kind: 'running' },
|
||||
{ ts: todayStart + DAY_MS, kind: 'ok' },
|
||||
{ ts: localMs(2026, 1, 14, 12, 0), kind: 'ok' },
|
||||
@@ -194,6 +195,9 @@ describe('proxmoxBackupActivityPresentation', () => {
|
||||
|
||||
expect(totals.get(dateKey(2026, 1, 7))).toBe(1);
|
||||
expect(totals.get(dateKey(2026, 1, 13))).toBe(2);
|
||||
expect(
|
||||
timeline.points.find((point) => point.key === dateKey(2026, 1, 13))!.counts.running,
|
||||
).toBe(1);
|
||||
expect(totals.get(dateKey(2026, 1, 6))).toBeUndefined();
|
||||
expect(totals.get(dateKey(2026, 1, 14))).toBeUndefined();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user