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.

merge: reconcile current monitoring and E2E contracts

rcourtman708e8f94fb83
diff --cc docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 078f8b659f,e655dc19d1..88e486f844
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@@ -15,19 -15,16 +15,28 @@@
## Purpose
+Infrastructure Add shortcuts and update chips follow the frontend primitives
+visible-label naming contract. Their names preserve `Add` or the displayed
+update wording and append source or host context, while keeping the existing
+installer destination and affected-agent scope. An Agent Doctor destination
+does not replace the update chip's visible action in its accessible name.
+Agent Doctor keeps evidence at its notice tone's full text contrast. Its
+scrollable repair, inspection, removal and credential commands are native
+keyboard focus targets with visible focus, so long commands remain readable
+without a pointer; copy actions and execution authority are unchanged.
+The command-access description in the installer must remain readable against
+its consent panel in both themes through the shared semantic text tokens. The
+operator needs that explanation before choosing host command authority.
+
+ ### Accepted host reports preserve disk-reading presence
+
+ An accepted host report is not evidence of a disk measurement. Disk history
+ recording and live fallback share canonical first-filesystem admission:
+ unavailable/absent readings stay absent while measured zero remains available.
+ Enrollment, receipt freshness, removal, correlation and stored observations keep
+ their existing semantics. The host disk recording and API presence regressions
+ cover this distinction; they do not establish installed guest recovery.
+
-
### Command access is a named token-step choice, not a legacy option (21 October 2026)
The installer's command-access checkbox reads **Allow Pulse to run commands on
diff --cc docs/release-control/v6/internal/subsystems/deployment-installability.md
index c612db548e,9b586b1e3f..cd884b00a9
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@@ -1996,6 -1996,6 +1996,7 @@@ Windows lifecycle controls or macOS ins
103. `scripts/release_lifecycle_rehearsal_versions.py`
104. `.github/workflows/dependency-advisory-watch.yml`
105. `scripts/dependency_advisory_watch.py`
++106. `tests/integration/scripts/settings-scroll-audit.mjs`
`scripts/installtests/run_unix_contracts.py` is the canonical exhaustive native Unix installer execution runner. Its dedicated verification files are `scripts/installtests/native_unix_contract_runner_test.go` and `scripts/tests/test_native_installer_contract_runner.py`. Script-smoke discovery and the native Go wrapper execute that same Python control suite, so phase inventory, failure propagation and real compiled-Go exit behavior retain one verification source.
@@@ -3014,14 -3015,6 +3016,21 @@@ artifact-selection behaviour
deterministic token authentication after setup, and may use the server setup
API as a fallback only when the UI wizard fails to complete cleanly under the
managed hot-dev runtime.
+ A successful token probe and a protected workspace URL do not establish
+ completed browser bootstrap. Token and cookie reuse must wait for the mounted
+ authenticated app shell before returning control to a journey, so a pending
+ workspace redirect cannot overwrite its next deep link. Browser rejection
+ remains an authentication failure rather than a reason to accept the URL or
+ retry login. `tests/integration/scripts/fixture-auth.test.mjs` exercises the
+ actual token helper with delayed and rejected bootstrap; the runtime-home
+ onboarding browser contract also holds a real protected-state request.
++ Settings browser audits scroll the actual application content owner to its
++ observed bottom. Traversal must scale with the populated estate rather than
++ stop after a fixed number of wheel steps. The browser geometry regression
++ `tests/integration/scripts/settings-scroll-audit.test.mjs` retains native
++ Chromium/WebKit traversal of short and 30,000px content plus the positive
++ horizontal-overflow control; the live mobile audit keeps its bottom and
++ overflow assertions.
The built `index.html` must not modulepreload lazy route chunks: the SRI
plugin runs with `preloadDynamicChunks: false` so cold start fetches only the
entry and its static vendor imports (route-level code splitting stays
diff --cc docs/release-control/v6/internal/subsystems/patrol-intelligence.md
index a8545cba35,a2f27c2eae..33ee69cdf3
--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md
@@@ -15,16 -15,16 +15,20 @@@
## Purpose
- Attention-row buttons derive their accessible names from their visible content,
- following the frontend primitives control-name contract. Severity, title,
- summary and relative observation age remain available to assistive technology
- in display order. A title-only override must not hide the other visible label
- text; selection, keyboard review and detail focus restoration keep their existing
- owners.
+ ### Attention selection retains visible evidence in its name (24 October 2026)
+
+ Attention list buttons use their visible contents as the accessible name instead
+ of replacing severity, summary, decision state and Last seen evidence with an
+ Open-title label. Resource-leading titles, flapping/handled badges, pressed state
+ and native keyboard/touch selection are preserved. The registered workbench
+ suite checks the full accessible name, including changes to relative time,
+ and existing review/detail/focus behaviour. No provider, action execution,
+ authorisation or attention-state semantics change.
+
+Mobile return controls retain `Back to list` in their contextual names. The
+expanded resource-copy control retains its visible `Copy ID` name, including
+after copying; the fuller explanation remains its tooltip.
+
### One-page Patrol setup on the Patrol page
When Patrol is blocked because no provider is connected, Pulse Intelligence
diff --cc docs/release-control/v6/internal/subsystems/registry.json
index e0debb861e,0ef63092d2..9453917fe5
--- a/docs/release-control/v6/internal/subsystems/registry.json
+++ b/docs/release-control/v6/internal/subsystems/registry.json
@@@ -4732,9 -4730,8 +4732,10 @@@
"tests/integration/scripts/hosted-tenant-runtime.mjs",
"tests/integration/scripts/managed-dev-runtime.mjs",
"tests/integration/scripts/relay-mobile-token-helper.go",
++ "tests/integration/scripts/settings-scroll-audit.mjs",
"tests/integration/tests/helpers.ts",
"tests/integration/tests/runtime-defaults.ts",
+ "tests/integration/tests/vmware-workload-fixture.ts",
"VERSION"
],
"release_cycle_artifact_globs": [
@@@ -5368,20 -5352,6 +5369,34 @@@
"scripts/installtests/native_unix_contract_runner_test.go",
"scripts/tests/test_native_installer_contract_runner.py"
]
+ },
+ {
+ "id": "browser-provider-inventory-fixture",
+ "label": "authoritative browser provider inventory fixture proof",
+ "match_prefixes": [],
+ "match_files": [
+ "tests/integration/tests/vmware-workload-fixture.ts"
+ ],
+ "allow_same_subsystem_tests": false,
+ "test_prefixes": [],
+ "exact_files": [
+ "tests/integration/tests/39-vmware-resource-detail-drawer.spec.ts",
+ "tests/integration/tests/41-vmware-phase1-exclusion-integrity.spec.ts"
+ ]
++ },
++ {
++ "id": "browser-settings-scroll-fixture",
++ "label": "complete native settings scroll audit proof",
++ "match_prefixes": [],
++ "match_files": [
++ "tests/integration/scripts/settings-scroll-audit.mjs"
++ ],
++ "allow_same_subsystem_tests": false,
++ "test_prefixes": [],
++ "exact_files": [
++ "tests/integration/scripts/settings-scroll-audit.test.mjs",
++ "tests/integration/tests/05-settings-mobile-audit.spec.ts"
++ ]
}
],
"match_files": null
diff --cc docs/release-control/v6/internal/subsystems/unified-resources.md
index 41a4e4d617,1faf910f76..246599ddc7
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@@ -23,15 -23,18 +23,26 @@@ and sort the complete canonical change
## Purpose
+### REST snapshots retain canonical source provenance
+
+`useUnifiedResources` preserves the validated source list on the canonical
+resource as well as its platform metadata. Owning-snapshot consumers such as
+Workloads derive their provider context from `resource.sources`; a REST refresh
+must not erase vCenter placement, host grouping or source-specific behavior
+that the websocket projection supplies. The REST mapping regression and the
+authoritative VMware drawer browser fixture cover that consuming boundary.
+
+ ### Host disk usage retains explicit presence
+
+ `HostDiskUsagePercent` shares the existing canonical first-filesystem admission
+ with host metric projection, history recording and legacy live fallback.
+ `HostView.DiskUsagePercent` returns the presence of the canonical disk metric,
+ not the zero default of a missing scalar accessor. Provider aggregate readings
+ need no agent filesystem inventory. Neither helper establishes freshness or
+ changes selection/identity. `TestHostDiskUsagePercentMatchesCanonicalPresence`
+ pins absent/invalid/zero/low readings, unchanged first-filesystem selection and
+ provider aggregate zero.
+
-
### Drawer history follows current source authority
Resource drawers withdraw current chart fallbacks and cached live-only replies
diff --cc tests/integration/scripts/settings-scroll-audit.mjs
index 8793c874cc,8793c874cc..c4a5dc1fa5
--- a/tests/integration/scripts/settings-scroll-audit.mjs
+++ b/tests/integration/scripts/settings-scroll-audit.mjs
@@@ -7,9 -7,9 +7,18 @@@ export const scrollSettingsToBottom = a
const step = await shell.evaluate((element) =>
Math.max(240, Math.floor(element.clientHeight * 0.75)),
);
-- for (let i = 0; i < 20; i += 1) {
++ // Fleet size determines the distance to the bottom. A fixed number of
++ // steps can stop halfway through a populated infrastructure page.
++ for (;;) {
++ const before = await settingsScrollPosition(page);
await shell.evaluate((element, deltaY) => element.scrollBy(0, deltaY), step);
await page.waitForTimeout(60);
++ const after = await settingsScrollPosition(page);
++ if (after.scrollTop >= after.maxScrollTop - 3 &&
++ after.maxScrollTop === before.maxScrollTop) return;
++ if (after.scrollTop <= before.scrollTop && after.maxScrollTop === before.maxScrollTop) {
++ throw new Error(`Settings content did not scroll: ${JSON.stringify(after)}`);
++ }
}
};
diff --cc tests/integration/scripts/settings-scroll-audit.test.mjs
index 1fb09799e8,1fb09799e8..7638d2187e
--- a/tests/integration/scripts/settings-scroll-audit.test.mjs
+++ b/tests/integration/scripts/settings-scroll-audit.test.mjs
@@@ -10,34 -10,34 +10,36 @@@ for (const [name, browserType] of Objec
const browser = await browserType.launch({ headless: true });
try {
for (const width of [320, 390, 430]) {
-- const page = await browser.newPage({
-- viewport: { width, height: 844 }, isMobile: true, hasTouch: true,
-- });
-- // Match App.tsx's h-screen/overflow-hidden parent and independently
-- // scrolling flex child, with content taller than a phone viewport.
-- await page.setContent(`<meta name="viewport" content="width=device-width, initial-scale=1"><style>
-- body { margin: 0; overflow-x: hidden; overflow-y: auto; }
-- .layout { display: flex; height: 100vh; overflow: hidden; }
-- .app-scroll-shell { flex: 1; min-width: 0; overflow-y: scroll; }
-- section { height: 3000px; }
-- </style><div class="layout"><div class="app-scroll-shell">
-- <section data-settings-content>Settings</section><footer>Last setting</footer>
-- </div></div>`);
-- // The old WebKit fallback cannot reach the actual content bottom.
-- await page.evaluate(() => window.scrollBy(0, 12660));
-- const before = await settingsScrollPosition(page);
-- assert.equal(before.scrollTop, 0);
-- assert.ok(before.maxScrollTop > 2000);
-- await scrollSettingsToBottom(page);
-- const after = await settingsScrollPosition(page);
-- assert.ok(after.scrollTop >= after.maxScrollTop - 3, JSON.stringify({ name, width, after }));
-- const footer = await page.locator('footer').boundingBox();
-- assert.ok(footer.y >= 0 && footer.y + footer.height <= 844);
-- assert.equal((await auditHorizontalOverflow(page)).overflowPx, 0);
-- // Horizontal overflow is still measurable, not hidden by the helper.
-- await page.locator('section').evaluate((element) => { element.style.width = '600px'; });
-- assert.equal((await auditHorizontalOverflow(page)).pageWidth, 600);
-- await page.close();
++ for (const contentHeight of [3000, 30000]) {
++ const page = await browser.newPage({
++ viewport: { width, height: 844 }, isMobile: true, hasTouch: true,
++ });
++ // Match App.tsx's h-screen/overflow-hidden parent and independently
++ // scrolling flex child, with content taller than a phone viewport.
++ await page.setContent(`<meta name="viewport" content="width=device-width, initial-scale=1"><style>
++ body { margin: 0; overflow-x: hidden; overflow-y: auto; }
++ .layout { display: flex; height: 100vh; overflow: hidden; }
++ .app-scroll-shell { flex: 1; min-width: 0; overflow-y: scroll; }
++ section { height: ${contentHeight}px; }
++ </style><div class="layout"><div class="app-scroll-shell">
++ <section data-settings-content>Settings</section><footer>Last setting</footer>
++ </div></div>`);
++ // The old WebKit fallback cannot reach the actual content bottom.
++ await page.evaluate(() => window.scrollBy(0, 12660));
++ const before = await settingsScrollPosition(page);
++ assert.equal(before.scrollTop, 0);
++ assert.ok(before.maxScrollTop > 2000);
++ await scrollSettingsToBottom(page);
++ const after = await settingsScrollPosition(page);
++ assert.ok(after.scrollTop >= after.maxScrollTop - 3, JSON.stringify({ name, width, contentHeight, after }));
++ const footer = await page.locator('footer').boundingBox();
++ assert.ok(footer.y >= 0 && footer.y + footer.height <= 844);
++ assert.equal((await auditHorizontalOverflow(page)).overflowPx, 0);
++ // Horizontal overflow is still measurable, not hidden by the helper.
++ await page.locator('section').evaluate((element) => { element.style.width = '600px'; });
++ assert.equal((await auditHorizontalOverflow(page)).pageWidth, 600);
++ await page.close();
++ }
}
} finally {
await browser.close();
diff --cc tests/integration/tests/01-core-e2e.spec.ts
index f6d67923cd,f94f97ae7f..664fe388d8
--- a/tests/integration/tests/01-core-e2e.spec.ts
+++ b/tests/integration/tests/01-core-e2e.spec.ts
@@@ -107,14 -107,14 +107,10 @@@ test.describe.serial('Core E2E flows',
});
let targetEditIndex = -1;
let resourceName = '';
-- let resourceNameOrdinal = 0;
-- const resourceNameCounts = new Map<string, number>();
for (let i = 0; i < (await editControls.count()); i++) {
const editControl = editControls.nth(i);
const label = (await editControl.getAttribute('aria-label')) ?? '';
const candidateName = label.replace(/^Edit thresholds for /, '');
-- const candidateOrdinal = resourceNameCounts.get(candidateName) ?? 0;
-- resourceNameCounts.set(candidateName, candidateOrdinal + 1);
const resourceContainer = await resourceContainerForEditControl(editControl);
const hasExistingOverride =
(await resourceContainer.getByRole('button', { name: /^Revert to defaults for / }).count()) >
@@@ -124,7 -124,7 +120,6 @@@
}
targetEditIndex = i;
resourceName = candidateName;
-- resourceNameOrdinal = candidateOrdinal;
break;
}
if (targetEditIndex < 0 || !resourceName) {
@@@ -161,16 -161,16 +156,6 @@@
await page.getByRole('button', { name: 'Save Changes' }).click();
await expect(unsaved).not.toBeVisible();
-- const updatedEditControl = page
-- .getByRole('button', { name: `Edit thresholds for ${resourceName}` })
-- .nth(resourceNameOrdinal);
-- const updatedResourceContainer =
-- await resourceContainerForEditControl(updatedEditControl);
-- const revertOverride = updatedResourceContainer.getByRole('button', {
-- name: `Revert to defaults for ${resourceName}`,
-- });
-- await expect(revertOverride).toBeVisible();
--
const configResAfterCreate = await apiRequest(page, '/api/alerts/config');
expect(configResAfterCreate.ok()).toBeTruthy();
const configAfterCreate = (await configResAfterCreate.json()) as { overrides?: Record<string, unknown> };
@@@ -181,6 -181,6 +166,20 @@@
expect(createdOverrideIds).toHaveLength(1);
const createdOverrideId = createdOverrideIds[0];
++ // The compact label can change as cluster metadata arrives. Resolve the
++ // saved identity and use its full searchable name instead of holding an
++ // earlier presentation label or an ordinal among similarly named rows.
++ const targetResponse = await apiRequest(page, `/api/resources/${encodeURIComponent(createdOverrideId)}`);
++ expect(targetResponse.ok()).toBeTruthy();
++ const target = await targetResponse.json() as { name: string; canonicalIdentity?: { displayName?: string } };
++ const targetName = target.canonicalIdentity?.displayName || target.name;
++ expect(targetName).toBeTruthy();
++ await page.getByPlaceholder('Search resources...').fill(targetName);
++ await expect(editControls).toHaveCount(1);
++ const updatedResourceContainer = await resourceContainerForEditControl(editControls.first());
++ const revertOverride = updatedResourceContainer.getByRole('button', { name: /^Revert to defaults for / });
++ await expect(revertOverride).toBeVisible();
++
await revertOverride.click();
await expect(unsaved).toBeVisible();
await page.getByRole('button', { name: 'Save Changes' }).click();
@@@ -214,15 -214,15 +213,15 @@@
if ((await sectionToggleAfterReload.getAttribute('aria-expanded')) === 'false') {
await sectionToggleAfterReload.click();
}
-- const editControlAfterReload = page
-- .getByRole('button', { name: `Edit thresholds for ${resourceName}` })
-- .nth(resourceNameOrdinal);
++ await page.getByPlaceholder('Search resources...').fill(targetName);
++ const editControlAfterReload = proxmoxNodesSection.getByRole('button', { name: /^Edit thresholds for / });
++ await expect(editControlAfterReload).toHaveCount(1);
await expect(editControlAfterReload).toBeVisible();
const resourceContainerAfterReload =
await resourceContainerForEditControl(editControlAfterReload);
await expect(
resourceContainerAfterReload.getByRole('button', {
-- name: `Revert to defaults for ${resourceName}`,
++ name: /^Revert to defaults for /,
}),
).toHaveCount(0);
diff --cc tests/integration/tests/04-mobile.spec.ts
index 38f33df26e,577ba23dba..3b8aa65660
--- a/tests/integration/tests/04-mobile.spec.ts
+++ b/tests/integration/tests/04-mobile.spec.ts
@@@ -85,12 -85,12 +85,12 @@@ const gotoMobileRoute = async
// an ellipsis. The drawer is where a truncated table cell sends the reader
// for the full value, so neither is allowed there.
const findCutDrawerValues = (section: Element): string[] => {
-- // Below lg the inline drawer's content shell clips anything past it.
-- let shell: HTMLElement | null = section.parentElement;
-- while (shell && window.getComputedStyle(shell).overflowX !== "clip") {
-- shell = shell.parentElement;
-- }
-- if (!shell) return ["no clipping drawer content shell"];
++ // Find the canonical owner independently of computed overflow keywords.
++ // Cross-axis overflow normalization can report hidden/auto instead of clip.
++ // The checks below still measure every clipping ancestor and ellipsis.
++ const shell = section.closest("tr[data-inline-detail-row]")
++ ?.querySelector<HTMLElement>(":scope > td > div");
++ if (!shell) return ["no inline drawer content shell"];
const offenders: string[] = [];
const walker = document.createTreeWalker(
diff --cc tests/integration/tests/15-settings-shell-consistency.spec.ts
index f119233d7a,f119233d7a..7622fd1ee3
--- a/tests/integration/tests/15-settings-shell-consistency.spec.ts
+++ b/tests/integration/tests/15-settings-shell-consistency.spec.ts
@@@ -43,9 -43,9 +43,9 @@@ const SETTINGS_SHELL_ROUTES =
},
{
route: '/settings/system-relay',
-- title: 'Remote Access',
++ title: 'Pulse Mobile',
description:
-- 'Check on your systems and get alert push notifications anywhere with the Pulse Mobile app — no port forwarding or VPN required.',
++ 'Connect paired Pulse Mobile devices to this instance. Pulse Mobile is being retired on 31 March 2027, and paired phones keep working until then.',
},
{
route: '/settings/security-auth',
diff --cc tests/integration/tests/17-proxmox-backups-layout.spec.ts
index 236777b261,236777b261..dd8e9bdea1
--- a/tests/integration/tests/17-proxmox-backups-layout.spec.ts
+++ b/tests/integration/tests/17-proxmox-backups-layout.spec.ts
@@@ -45,7 -45,7 +45,7 @@@ async function openProxmoxBackups(page
// The route commits before the Proxmox snapshot finishes loading. CI can
// take more than a minute while all E2E shards share the runner, so wait for
// the destination surface rather than the URL alone.
-- await expect(page.getByText("Backups per day").first()).toBeVisible({
++ await expect(page.getByText("Completed restore points per day").first()).toBeVisible({
timeout: 120_000,
});
await expect(page.getByRole("group", { name: "Activity range" })).toBeVisible(
@@@ -73,19 -73,19 +73,19 @@@ test.describe("Proxmox backups layout g
await openProxmoxBackups(page);
// The Backups section now opens the date view directly.
-- const dayButtons = page.getByRole("button", { name: /: \d+ backups?$/ });
++ const dayButtons = page.getByRole("button", { name: /: \d+ restore points?$/ });
await expect.poll(() => dayButtons.count()).toBeGreaterThanOrEqual(7);
-- const totalCopy = page.getByText(/^\d+ backups$/).first();
++ const totalCopy = page.getByText(/^\d+ backup entries$/).first();
await expect(totalCopy).toBeVisible();
// Picking a day narrows the table without navigating away.
const activeDay = page
-- .getByRole("button", { name: /: [1-9]\d* backups?$/ })
++ .getByRole("button", { name: /: [1-9]\d* restore points?$/ })
.last();
await activeDay.click();
await expect(page).toHaveURL(/\/proxmox\/backups/);
-- await expect(page.getByText(/^\d+ of \d+ backups$/).first()).toBeVisible();
++ await expect(page.getByText(/^\d+ of \d+ backup entries$/).first()).toBeVisible();
});
test("long-range activity keeps the page inside the horizontal viewport", async ({
@@@ -106,7 -106,7 +106,7 @@@
.getByRole("button", { name: "1y" })
.click();
-- const dayButtons = page.getByRole("button", { name: /: \d+ backups?$/ });
++ const dayButtons = page.getByRole("button", { name: /: \d+ restore points?$/ });
await expect.poll(() => dayButtons.count()).toBe(365);
// A year of bars must stay contained: the chart may scroll internally but
diff --cc tests/integration/tests/49-demo-scenario-curation.spec.ts
index df0075b3af,df0075b3af..cd5421228f
--- a/tests/integration/tests/49-demo-scenario-curation.spec.ts
+++ b/tests/integration/tests/49-demo-scenario-curation.spec.ts
@@@ -138,6 -138,6 +138,9 @@@ test.describe.serial("Demo scenario cur
await expect(page.getByTestId("proxmox-page")).toBeVisible({
timeout: 60_000,
});
++ // Overview starts with a compact host preview. Inspect the full estate
++ // through its native disclosure before looking for nodes outside it.
++ await page.getByRole("button", { name: /^Show all \d+ nodes$/ }).click();
await expectSomeRowContains(page, "West Production A");
await expectSomeRowContains(page, "East Production A");
await expectSomeRowContains(page, "Edge Sites A");
@@@ -152,14 -152,14 +155,12 @@@
await expect(workloadSearch).toHaveValue("");
await expectNoRowContains(page, "mock-cluster");
-- const guestTotals = page.getByTestId("proxmox-guest-totals");
-- await expect(guestTotals).toBeVisible({ timeout: 30_000 });
++ const guestsHeading = page.getByRole("heading", { name: /^Guests \d+$/ });
++ await expect(guestsHeading).toBeVisible({ timeout: 30_000 });
await expect
.poll(async () => {
-- const text = (await guestTotals.innerText()).replace(/\s+/g, " ");
-- return Array.from(
-- text.matchAll(/(\d+) (?:running|attention|stopped)/g),
-- ).reduce((total, match) => total + Number(match[1]), 0);
++ const text = await guestsHeading.innerText();
++ return Number(text.match(/\d+/)?.[0] ?? 0);
})
.toBeGreaterThan(500);
@@@ -204,8 -204,8 +205,16 @@@
await expect(page.getByTestId("storage-page")).toBeVisible({
timeout: 60_000,
});
-- await expectSomeRowContains(page, "shared-backup-fabric");
-- await expectSomeRowContains(page, "west-a-service-pool");
++ const storageSearch = page.getByRole("textbox", {
++ name: /Search Proxmox storage/,
++ });
++ // Storage is windowed too. Use its native search to inspect entries
++ // outside the currently mounted capacity-sorted rows.
++ for (const pool of ["shared-backup-fabric", "west-a-service-pool"]) {
++ await storageSearch.fill(pool);
++ await expectSomeRowContains(page, pool);
++ }
++ await storageSearch.fill("");
await expectNoRowContains(page, "mock-cluster");
await page.goto("/proxmox/backups", { waitUntil: "domcontentloaded" });
@@@ -217,6 -217,6 +226,9 @@@
"data-proxmox-backups-windowed",
"true",
);
++ await expect
++ .poll(() => coverageTable.locator('[data-proxmox-backup-row="coverage"]').count())
++ .toBeGreaterThan(0);
expect(
await coverageTable
.locator('[data-proxmox-backup-row="coverage"]')
@@@ -228,7 -228,7 +240,7 @@@
await backupSearch.fill("checkout-web-01");
await expectSomeRowContains(page, "checkout-web-01");
await backupSearch.fill("");
-- await page.getByRole("button", { name: "By date", exact: true }).click();
++ await page.getByRole("link", { name: "By date", exact: true }).click();
const recoverableTable = page.locator(
'[data-proxmox-backups-table="recoverable"]',
);
@@@ -236,6 -236,6 +248,9 @@@
"data-proxmox-backups-windowed",
"true",
);
++ await expect
++ .poll(() => recoverableTable.locator('[data-proxmox-backup-row]').count())
++ .toBeGreaterThan(0);
expect(
await recoverableTable.locator("[data-proxmox-backup-row]").count(),
).toBeLessThanOrEqual(140);
diff --cc tests/integration/tests/50-storage-physical-disk-io-history.spec.ts
index 21b7dcafc6,21b7dcafc6..631abc203e
--- a/tests/integration/tests/50-storage-physical-disk-io-history.spec.ts
+++ b/tests/integration/tests/50-storage-physical-disk-io-history.spec.ts
@@@ -3,7 -3,7 +3,7 @@@ import path from 'node:path'
import { fileURLToPath } from 'node:url';
import { expect, test as base, type Page } from '@playwright/test';
--import { createAuthenticatedStorageState, getMockMode, setMockMode } from './helpers';
++import { apiRequest, createAuthenticatedStorageState, getMockMode, setMockMode } from './helpers';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@@ -71,6 -71,6 +71,20 @@@ test.describe.serial('Storage physical
await ensureMockModeEnabled(page);
++ // Fixture disk placement is deterministic by node identity, rather than
++ // a fixed model/owner pair. Pin an actual serial-bearing Proxmox disk and
++ // prove that the drawer requests history for that same canonical serial.
++ const inventory = await apiRequest(page, '/api/resources?type=physical_disk&source=proxmox');
++ expect(inventory.ok()).toBeTruthy();
++ const { data: disks } = await inventory.json() as { data: Array<{
++ id: string;
++ physicalDisk?: { serial?: string; model?: string; devPath?: string };
++ }> };
++ const target = disks.find((resource) => resource.physicalDisk?.serial &&
++ resource.physicalDisk.model && resource.physicalDisk.devPath?.startsWith('/dev/nvme'));
++ expect(target, 'The mock estate must include a serial-bearing NVMe disk').toBeDefined();
++ const targetSerial = target!.physicalDisk!.serial!;
++
const diskHistoryResponses = new Map<string, { resourceId: string; points: number }>();
page.on('response', async (response) => {
const url = response.url();
@@@ -81,17 -81,17 +95,18 @@@
if (parsed.searchParams.get('resourceType') !== 'disk') {
return;
}
-- const metric = parsed.searchParams.get('metric') || '';
-- if (!['diskread', 'diskwrite', 'disk'].includes(metric)) {
-- return;
-- }
++ if (parsed.searchParams.get('resourceId') !== targetSerial) return;
try {
-- const payload = (await response.json()) as { resourceId?: string; points?: unknown[] };
-- diskHistoryResponses.set(metric, {
-- resourceId: payload.resourceId || '',
-- points: Array.isArray(payload.points) ? payload.points.length : 0,
-- });
++ const payload = (await response.json()) as {
++ resourceId?: string; metrics?: Record<string, unknown[]>;
++ };
++ for (const metric of ['diskread', 'diskwrite', 'disk']) {
++ diskHistoryResponses.set(metric, {
++ resourceId: payload.resourceId || '',
++ points: payload.metrics?.[metric]?.length || 0,
++ });
++ }
} catch {
// The drawer polls on an interval; a response can land while the page
// is tearing down, and json() on it must not fail the test.
@@@ -106,20 -106,20 +121,17 @@@
await disksTab.click({ timeout: 30_000 });
const search = page.getByRole('textbox', { name: /Search Proxmox storage/ });
await expect(search).toBeVisible({ timeout: 30_000 });
-- await search.fill('nvme2');
++ await search.fill(target!.physicalDisk!.model!);
-- const row = page
-- .locator('table tbody tr')
-- .filter({ hasText: 'Samsung 980 PRO 2TB' })
-- .filter({ hasText: 'pve2' })
-- .first();
++ const row = page.locator(`table tbody tr[data-row-id=${JSON.stringify(target!.id)}]`);
await expect(row).toBeVisible({ timeout: 30_000 });
await row.getByRole('button', { name: /^Expand / }).click();
-- const detail = page.locator('[data-inline-detail-for]').filter({ has: page.getByText('Live I/O (30m)') }).first();
++ const detail = page.locator(`[data-inline-detail-for=${JSON.stringify(targetSerial)}]`);
await expect(detail).toBeVisible();
-- await expect(detail.getByText('Collecting data... History will appear here.')).toHaveCount(0);
++ await expect(detail.getByRole('img', { name: 'Disk I/O history', exact: true })).toBeVisible();
++ await expect(detail.getByRole('combobox', { name: 'History range', exact: true })).toHaveValue('24h');
await expect
.poll(() => Array.from(diskHistoryResponses.keys()).sort().join(','))
@@@ -128,7 -128,7 +140,7 @@@
for (const metric of ['diskread', 'diskwrite', 'disk'] as const) {
await expect
.poll(() => diskHistoryResponses.get(metric)?.resourceId || '')
-- .toBe('SERIAL884006359727');
++ .toBe(targetSerial);
await expect
.poll(() => diskHistoryResponses.get(metric)?.points || 0)
.toBeGreaterThan(0);
@@@ -181,12 -181,12 +193,11 @@@
if (parsed.searchParams.get('resourceType') !== 'disk') return;
if (parsed.searchParams.get('resourceId') !== summarySeriesId) return;
-- const metric = parsed.searchParams.get('metric') || '';
-- if (!['diskread', 'diskwrite', 'disk'].includes(metric)) return;
--
try {
-- const payload = (await response.json()) as { points?: unknown[] };
-- detailResponsePoints.set(metric, Array.isArray(payload.points) ? payload.points.length : 0);
++ const payload = (await response.json()) as { metrics?: Record<string, unknown[]> };
++ for (const metric of ['diskread', 'diskwrite', 'disk']) {
++ detailResponsePoints.set(metric, payload.metrics?.[metric]?.length || 0);
++ }
} catch {
// Ignore responses that resolve while the page is tearing down.
}
@@@ -198,29 -198,29 +209,20 @@@
const detail = page.locator(`[data-inline-detail-for="${summarySeriesId}"]`);
await expect(detail).toBeVisible();
-- await page.waitForTimeout(250);
--
-- const collectingCount = await detail
-- .getByText('Collecting data... History will appear here.')
-- .count();
--
-- if (collectingCount > 0) {
-- failures.push(`${rowText} [overlay]`);
-- } else {
-- for (const metric of ['diskread', 'diskwrite', 'disk'] as const) {
-- let points = 0;
-- try {
-- await expect.poll(() => detailResponsePoints.get(metric) || 0, {
-- timeout: 10_000,
-- }).toBeGreaterThan(0);
-- points = detailResponsePoints.get(metric) || 0;
-- } catch {
-- // Report every drawer without aborting at the first slow series.
-- }
-- if (points <= 0) {
-- failures.push(`${rowText} [${metric}:0 points via ${summarySeriesId || 'no-series-id'}]`);
-- break;
-- }
++ await expect(detail.getByRole('img', { name: 'Disk I/O history', exact: true })).toBeVisible();
++ for (const metric of ['diskread', 'diskwrite', 'disk'] as const) {
++ let points = 0;
++ try {
++ await expect.poll(() => detailResponsePoints.get(metric) || 0, {
++ timeout: 10_000,
++ }).toBeGreaterThan(0);
++ points = detailResponsePoints.get(metric) || 0;
++ } catch {
++ // Report every drawer without aborting at the first slow series.
++ }
++ if (points <= 0) {
++ failures.push(`${rowText} [${metric}:0 points via ${summarySeriesId || 'no-series-id'}]`);
++ break;
}
}
diff --cc tests/integration/tests/79-update-flow.spec.ts
index 95b2cad480,95b2cad480..85653b9f96
--- a/tests/integration/tests/79-update-flow.spec.ts
+++ b/tests/integration/tests/79-update-flow.spec.ts
@@@ -18,7 -18,7 +18,7 @@@
*/
import { expect, test, type Page } from "@playwright/test";
--import { apiRequest, ensureAuthenticated } from "./helpers";
++import { apiRequest } from "./helpers";
const MOCK_STABLE_VERSION = "99.0.0";
const MOCK_RC_VERSION = "99.1.0-rc.1";
@@@ -63,15 -63,15 +63,14 @@@ async function fetchUpdateStatus(page:
test.describe.serial("update flow against the mock update server", () => {
test.beforeEach(async ({ page }) => {
-- await ensureAuthenticated(page);
++ // This is an API contract. apiRequest carries the admitted primary token
++ // without mounting a dashboard and starting unrelated update polling for
++ // every case in the serial flow.
if (mockUpdateServerWired === null) {
const res = await apiRequest(page, "/api/updates/check?channel=stable");
-- if (!res.ok()) {
-- mockUpdateServerWired = false;
-- } else {
-- const info = (await res.json()) as UpdateInfo;
-- mockUpdateServerWired = info.latestVersion === MOCK_STABLE_VERSION;
-- }
++ expect(res.ok(), await res.text()).toBeTruthy();
++ const info = (await res.json()) as UpdateInfo;
++ mockUpdateServerWired = info.latestVersion === MOCK_STABLE_VERSION;
}
test.skip(
!mockUpdateServerWired,
diff --cc tests/integration/tests/83-product-trust-accessibility.spec.ts
index 633378387f,8022ef4c3d..b6022c15dd
--- a/tests/integration/tests/83-product-trust-accessibility.spec.ts
+++ b/tests/integration/tests/83-product-trust-accessibility.spec.ts
@@@ -212,49 -202,6 +212,49 @@@ test(`representative authenticated surf
await page.keyboard.press("Escape");
await expect(dialog).toBeHidden();
await expect(addButton).toBeFocused();
+
+ const installAgent = page.getByRole("button", { name: "Add Pulse Agent hosts", exact: true });
+ await installAgent.focus();
+ await page.keyboard.press("Enter");
+ const installer = page.getByRole("dialog");
+ await expect(installer.getByRole("heading", { name: "Add Pulse Agent", exact: true })).toBeVisible();
+ expect(await scanForWcagViolations(page)).toEqual([]);
+ await page.keyboard.press("Escape");
+ await expect(installer).toBeHidden();
+ await expect(installAgent).toBeFocused();
+
+ await page.getByRole("button", {
- name: /^(Agent update|\d+ (agent )?updates) for /,
++ name: /^(Agent update|\d+ (agent )?updates): open Agent Doctor for /,
+ }).first().click();
+ await expect(page.getByRole("heading", { name: "Agent Doctor", exact: true })).toBeVisible();
+ expect(new URL(page.url()).searchParams.getAll("agents").length).toBeGreaterThan(0);
+ const command = page.locator("pre").first();
+ await expect(command).toBeVisible();
+ await command.focus();
+ await expect(command).toBeFocused();
+ await page.keyboard.press("ArrowRight");
+ await expect.poll(() => command.evaluate(node => node.scrollLeft)).toBeGreaterThan(0);
+ expect(await scanForWcagViolations(page)).toEqual([]);
+ }
+
+ if (surface.route === "/patrol") {
+ const list = page.getByRole("list", { name: "Patrol attention items", exact: true });
+ const item = list.getByRole("button").first();
+ await item.focus();
+ await page.keyboard.press("Enter");
+ const detail = page.getByRole("complementary");
+ await expect(detail).toBeVisible();
+ await expect(detail).toHaveAttribute("aria-busy", "false");
+ const selectedTitle = await detail.getByRole("heading", { level: 3 }).first().innerText();
+ expect(await scanForWcagViolations(page)).toEqual([]);
+ await detail.getByText("Evidence and history", { exact: true }).click();
+ await expect(detail.getByRole("button", { name: "Copy ID", exact: true })).toBeVisible();
+ expect(await scanForWcagViolations(page)).toEqual([]);
+ const back = detail.getByRole("button", { name: "Back to list of Patrol attention", exact: true });
+ if (await back.isVisible()) await back.click();
+ else await detail.getByRole("button", { name: "Close attention detail", exact: true }).click();
+ await expect(detail).toBeHidden();
+ await expect(list.locator("button:focus")).toContainText(selectedTitle);
}
}
});