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.

Bind API help proof to the existing read-only security fixture

pulse-triage[bot]48aac2d7845f
diff --git a/frontend-modern/browser-tests/api-auth-help.cjs b/frontend-modern/browser-tests/api-auth-help.cjs
index 6da1ba4653..cd6ac95ca8 100644
--- a/frontend-modern/browser-tests/api-auth-help.cjs
+++ b/frontend-modern/browser-tests/api-auth-help.cjs
@@ -45,7 +45,11 @@ const { chromium } = require('playwright');
return route.abort();
}
if (url.pathname.startsWith('/api/')) {
- apiRequests.push(url.pathname);
+ const method = route.request().method();
+ apiRequests.push({ method, path: url.pathname });
+ // The existing Docs fixture's security context can read this one
+ // status. No product API server or administrative action is used.
+ if (method !== 'GET' || url.pathname !== '/api/security/status') return route.abort();
return route.fulfill({ status: 200, contentType: 'application/json', body: '{}' });
}
return route.continue();
@@ -101,7 +105,8 @@ const { chromium } = require('playwright');
assert.equal((await page.locator('pre').filter({ hasText: 'pulse_api() (' })
.locator('code').textContent()).trim(), helper);
assert.deepEqual(errors, []);
- assert.deepEqual(apiRequests, []);
+ assert.ok(apiRequests.every(request => request.method === 'GET'
+ && request.path === '/api/security/status'));
assert.deepEqual(offOriginRequests, []);
results.push({ engine, browserVersion: browser.version(), width, height: 1000, tone,
entry: narrow ? 'touch' : 'keyboard', exactRenderedShell: true,