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.

Finish Core E2E release gate alignment

rcourtman7ce7bbf32383
diff --git a/tests/integration/tests/01-core-e2e.spec.ts b/tests/integration/tests/01-core-e2e.spec.ts
index 787bac0bd1..8cb0c046cf 100644
--- a/tests/integration/tests/01-core-e2e.spec.ts
+++ b/tests/integration/tests/01-core-e2e.spec.ts
@@ -43,8 +43,8 @@ test.describe.serial('Core E2E flows', () => {
await expect(alertsToggleOnOverview).toBeVisible();
const alertsInitiallyEnabled = await alertsToggleOnOverview.isChecked();
if (!alertsInitiallyEnabled) {
- await alertsToggleOnOverview.click({ force: true });
- await expect(page.getByText('Notifications enabled', { exact: true })).toBeVisible();
+ await alertsToggleOnOverview.locator('xpath=ancestor::label[1]').click();
+ await expect(alertsToggleOnOverview).toBeChecked({ timeout: 30_000 });
}
// Navigate to thresholds via in-app nav to avoid a full reload redirecting while activation is loading.
diff --git a/tests/integration/tests/04-mobile.spec.ts b/tests/integration/tests/04-mobile.spec.ts
index 8e81cd8eca..7ac2374c68 100644
--- a/tests/integration/tests/04-mobile.spec.ts
+++ b/tests/integration/tests/04-mobile.spec.ts
@@ -222,15 +222,27 @@ test.describe("Mobile viewport flows", () => {
await expect(primaryRail).toBeVisible();
await expect(utilityRail).toBeVisible();
- const railGeometry = await primaryRail.evaluate((element) => ({
- clientWidth: element.clientWidth,
- scrollWidth: element.scrollWidth,
- overflowX: window.getComputedStyle(element).overflowX,
- }));
- expect(["auto", "scroll"]).toContain(railGeometry.overflowX);
- expect(railGeometry.scrollWidth).toBeGreaterThanOrEqual(
- railGeometry.clientWidth,
- );
+ await expect
+ .poll(
+ () =>
+ page.evaluate(() => {
+ const element = document.querySelector<HTMLElement>(
+ '[data-mobile-nav-rail="primary"]',
+ );
+ if (!element) return null;
+ return {
+ hasScrollableOverflow: ["auto", "scroll"].includes(
+ window.getComputedStyle(element).overflowX,
+ ),
+ preservesRailWidth: element.scrollWidth >= element.clientWidth,
+ };
+ }),
+ { timeout: 30_000 },
+ )
+ .toEqual({
+ hasScrollableOverflow: true,
+ preservesRailWidth: true,
+ });
const viewportWidth = await getViewportWidth(page);
for (const tabId of ["alerts", "ai", "settings"]) {
diff --git a/tests/integration/tests/11-first-session.spec.ts b/tests/integration/tests/11-first-session.spec.ts
index c24da4f8ba..986c3c69ed 100644
--- a/tests/integration/tests/11-first-session.spec.ts
+++ b/tests/integration/tests/11-first-session.spec.ts
@@ -178,11 +178,11 @@ test.describe.serial("First-session experience", () => {
] as const;
const consoleErrors: string[] = [];
- // The app shell polls Patrol open work (stored findings + pending
- // approvals) on every authenticated route to drive the Patrol nav badge.
- // Those are cheap reads, not AI invocations, so they are exempt here.
+ // The app shell polls Patrol open work and its compact attention summary
+ // on every authenticated route to drive the Patrol nav badge. Those are
+ // cheap reads, not AI invocations, so they are exempt here.
const appShellPatrolPolling =
- /\/api\/ai\/(?:patrol\/findings|approvals)(?:\?|$)/;
+ /\/api\/ai\/(?:patrol\/(?:findings|attention\/summary)|approvals)(?:\?|$)/;
const aiRequests = trackBrowserRequests(page, /\/api\/ai(\/|$)/);
page.on("console", (msg) => {
if (msg.type() === "error") {
diff --git a/tests/integration/tests/17-proxmox-backups-layout.spec.ts b/tests/integration/tests/17-proxmox-backups-layout.spec.ts
index 7c1dee36d9..4cda4e5f43 100644
--- a/tests/integration/tests/17-proxmox-backups-layout.spec.ts
+++ b/tests/integration/tests/17-proxmox-backups-layout.spec.ts
@@ -1,8 +1,24 @@
-import { expect, test } from "@playwright/test";
+import { expect, test, type Page } from "@playwright/test";
import { ensureAuthenticated } from "./helpers";
const DESKTOP_VIEWPORT = { width: 1440, height: 900 };
+async function openProxmoxBackups(page: Page) {
+ const proxmoxTab = page.getByRole("tab", {
+ name: "Proxmox",
+ exact: true,
+ });
+ await expect(proxmoxTab).toBeVisible({ timeout: 30_000 });
+ await proxmoxTab.click();
+
+ const sections = page.getByRole("navigation", {
+ name: "Proxmox sections",
+ });
+ await expect(sections).toBeVisible({ timeout: 60_000 });
+ await sections.getByRole("link", { name: "Backups", exact: true }).click();
+ await expect(page).toHaveURL(/\/proxmox\/backups$/);
+}
+
// Layout guards for the Proxmox Backups section, which replaced the retired
// standalone /recovery surface. Runs against the mock-mode dataset; counts
// are asserted as shapes, not pinned values.
@@ -19,11 +35,13 @@ test.describe("Proxmox backups layout guards", () => {
await page.setViewportSize(DESKTOP_VIEWPORT);
await ensureAuthenticated(page);
- await page.goto("/proxmox/backups", { waitUntil: "domcontentloaded" });
+ await openProxmoxBackups(page);
// The guest-centric Coverage view is the default whenever anything needs
// attention; the day-activity strip lives in the By date view.
- await page.getByRole("button", { name: "By date" }).click();
+ const byDateButton = page.getByRole("button", { name: "By date" });
+ await expect(byDateButton).toBeVisible({ timeout: 60_000 });
+ await byDateButton.click();
await expect(page.getByText("Backups per day").first()).toBeVisible();
const dayButtons = page.getByRole("button", { name: /: \d+ backups?$/ });
await expect.poll(() => dayButtons.count()).toBeGreaterThanOrEqual(7);
@@ -50,9 +68,11 @@ test.describe("Proxmox backups layout guards", () => {
await page.setViewportSize(DESKTOP_VIEWPORT);
await ensureAuthenticated(page);
- await page.goto("/proxmox/backups", { waitUntil: "domcontentloaded" });
+ await openProxmoxBackups(page);
- await page.getByRole("button", { name: "By date" }).click();
+ const byDateButton = page.getByRole("button", { name: "By date" });
+ await expect(byDateButton).toBeVisible({ timeout: 60_000 });
+ await byDateButton.click();
await page
.getByRole("group", { name: "Activity range" })
diff --git a/tests/integration/tests/52-ai-settings-provider-setup.spec.ts b/tests/integration/tests/52-ai-settings-provider-setup.spec.ts
index 4c67f2b851..674c142c51 100644
--- a/tests/integration/tests/52-ai-settings-provider-setup.spec.ts
+++ b/tests/integration/tests/52-ai-settings-provider-setup.spec.ts
@@ -164,7 +164,7 @@ test.describe("Pulse Intelligence settings provider setup", () => {
// Per-model overrides moved into the section panels; the panel signals
// enabled state and the backend-selected shared default model here.
await expect(
- page.getByRole("button", { name: "Enable Pulse Intelligence" }),
+ page.getByLabel("Enable Pulse Intelligence"),
).toHaveAttribute("aria-pressed", "true");
});
diff --git a/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts b/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
index 8d30576362..fcd78465c4 100644
--- a/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
+++ b/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
@@ -105,6 +105,11 @@ async function getVisibleSettingsNavigation(
.getByRole('tablist', { name: 'Mobile navigation' })
.getByRole('button', { name: 'Settings', exact: true })
.click();
+ const settingsDrawerButton = page
+ .getByRole('main')
+ .getByRole('button', { name: 'Settings', exact: true });
+ await expect(settingsDrawerButton).toBeVisible();
+ await settingsDrawerButton.click();
}
const settingsNavigation = page.locator('[aria-label="Settings navigation"]');
diff --git a/tests/integration/tests/56-pulse-account-upgrade-bootstrap.spec.ts b/tests/integration/tests/56-pulse-account-upgrade-bootstrap.spec.ts
index 2d07c95170..ce2592fad4 100644
--- a/tests/integration/tests/56-pulse-account-upgrade-bootstrap.spec.ts
+++ b/tests/integration/tests/56-pulse-account-upgrade-bootstrap.spec.ts
@@ -1,20 +1,52 @@
import { spawn, type ChildProcess } from "node:child_process";
+import { createServer } from "node:net";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { expect, test } from "@playwright/test";
-const PORTAL_PREVIEW_PORT = "8876";
-const PORTAL_PREVIEW_URL = `http://127.0.0.1:${PORTAL_PREVIEW_PORT}`;
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const PORTAL_FRONTEND_DIR = path.resolve(
__dirname,
"../../../internal/cloudcp/portal/frontend",
);
-async function waitForPortalPreview(url: string, timeoutMs: number) {
+async function reserveLoopbackPort(): Promise<number> {
+ return new Promise((resolve, reject) => {
+ const server = createServer();
+ server.unref();
+ server.once("error", reject);
+ server.listen(0, "127.0.0.1", () => {
+ const address = server.address();
+ if (!address || typeof address === "string") {
+ server.close();
+ reject(new Error("Could not reserve a loopback port"));
+ return;
+ }
+ server.close((error) => {
+ if (error) {
+ reject(error);
+ return;
+ }
+ resolve(address.port);
+ });
+ });
+ });
+}
+
+async function waitForPortalPreview(
+ url: string,
+ timeoutMs: number,
+ process: ChildProcess,
+ readOutput: () => string,
+) {
const deadline = Date.now() + timeoutMs;
while (Date.now() < deadline) {
+ if (process.exitCode !== null || process.signalCode !== null) {
+ throw new Error(
+ `Pulse Account preview exited before becoming ready at ${url}:\n${readOutput()}`,
+ );
+ }
try {
const response = await fetch(url);
if (response.ok) {
@@ -25,11 +57,18 @@ async function waitForPortalPreview(url: string, timeoutMs: number) {
}
await new Promise((resolve) => setTimeout(resolve, 200));
}
- throw new Error(`Timed out waiting for Pulse Account preview at ${url}`);
+ throw new Error(
+ `Timed out waiting for Pulse Account preview at ${url}:\n${readOutput()}`,
+ );
}
async function stopPortalPreview(process: ChildProcess | null) {
- if (!process || process.killed) {
+ if (
+ !process ||
+ process.killed ||
+ process.exitCode !== null ||
+ process.signalCode !== null
+ ) {
return;
}
await new Promise<void>((resolve) => {
@@ -48,38 +87,52 @@ test.describe.configure({ mode: "serial" });
test.describe("Pulse Account upgrade bootstrap", () => {
let previewProcess: ChildProcess | null = null;
+ let portalPreviewURL = "";
test.beforeAll(async ({}, testInfo) => {
if (testInfo.project.name.startsWith("mobile-")) {
return;
}
+ const portalPreviewPort = String(await reserveLoopbackPort());
+ portalPreviewURL = `http://127.0.0.1:${portalPreviewPort}`;
+ let previewOutput = "";
+ const appendOutput = (chunk: Buffer) => {
+ previewOutput = `${previewOutput}${chunk.toString("utf8")}`.slice(-8000);
+ };
const processHandle = spawn(process.execPath, ["dev.mjs"], {
cwd: PORTAL_FRONTEND_DIR,
env: {
...process.env,
- PULSE_PORTAL_PREVIEW_PORT: PORTAL_PREVIEW_PORT,
+ PULSE_PORTAL_PREVIEW_PORT: portalPreviewPort,
},
stdio: ["ignore", "pipe", "pipe"],
});
previewProcess = processHandle;
- processHandle.stdout?.on("data", () => {});
- processHandle.stderr?.on("data", () => {});
- await waitForPortalPreview(`${PORTAL_PREVIEW_URL}/healthz`, 30000);
+ processHandle.stdout?.on("data", appendOutput);
+ processHandle.stderr?.on("data", appendOutput);
+ await waitForPortalPreview(
+ `${portalPreviewURL}/healthz`,
+ 60_000,
+ processHandle,
+ () => previewOutput,
+ );
});
test.afterAll(async () => {
await stopPortalPreview(previewProcess);
});
- test("accepts the canonical portal handoff bootstrap", async ({ page }, testInfo) => {
+ test("accepts the canonical portal handoff bootstrap", async ({
+ page,
+ }, testInfo) => {
test.skip(
testInfo.project.name.startsWith("mobile-"),
"Desktop-only billing continuity",
);
await page.goto(
- `${PORTAL_PREVIEW_URL}/?scenario=managed&portal_handoff_id=cph_preview_upgrade`,
+ `${portalPreviewURL}/?scenario=managed&portal_handoff_id=cph_preview_upgrade`,
{ waitUntil: "domcontentloaded" },
);
@@ -88,11 +141,11 @@ test.describe("Pulse Account upgrade bootstrap", () => {
"Pulse Account will return completed checkout directly to the Plans page in Pulse.",
),
).toBeVisible();
- await expect(
- page.getByText(
- "Community keeps core monitoring free. Relay gets your Pulse web UI securely reachable from anywhere. Pro adds Patrol control, alert investigation, verified fixes, and 90-day history.",
- ),
- ).toBeVisible();
+ await expect(
+ page.getByText(
+ "Community keeps core monitoring free. Relay gets your Pulse web UI securely reachable from anywhere. Pro adds Patrol control, alert investigation, verified fixes, and 90-day history.",
+ ),
+ ).toBeVisible();
await expect(
page.getByText(
"Pulse Account keeps checkout tied to the Pulse instance that opened it, so completed Relay or Pro purchases return to the right Plans page automatically.",
@@ -103,32 +156,41 @@ test.describe("Pulse Account upgrade bootstrap", () => {
"Open this upgrade from the Plans page in Pulse so Pulse Account can verify the secure plan upgrade handoff before checkout.",
),
).toHaveCount(0);
- await expect(page.getByRole("button", { name: "Buy Annual" }).first()).toBeEnabled();
+ await expect(
+ page.getByRole("button", { name: "Buy Annual" }).first(),
+ ).toBeEnabled();
const checkoutRequestPromise = page.waitForRequest((request) => {
return (
request.method() === "POST" &&
- request.url().includes("/__portal_preview/commercial/v1/checkout/session")
+ request
+ .url()
+ .includes("/__portal_preview/commercial/v1/checkout/session")
);
});
const buyAnnual = page.getByRole("button", { name: "Buy Annual" }).first();
await buyAnnual.click();
const checkoutRequest = await checkoutRequestPromise;
- const checkoutPayload = checkoutRequest.postDataJSON() as Record<string, string>;
+ const checkoutPayload = checkoutRequest.postDataJSON() as Record<
+ string,
+ string
+ >;
expect(checkoutPayload.portal_handoff_id).toBe("cph_preview_upgrade");
expect("checkout_intent_id" in checkoutPayload).toBe(false);
await expect(page).toHaveURL(/preview_toast=/);
});
- test("blocks the retired checkout-intent bootstrap path", async ({ page }, testInfo) => {
+ test("blocks the retired checkout-intent bootstrap path", async ({
+ page,
+ }, testInfo) => {
test.skip(
testInfo.project.name.startsWith("mobile-"),
"Desktop-only billing continuity",
);
await page.goto(
- `${PORTAL_PREVIEW_URL}/?scenario=managed&service=upgrade&checkout_intent_id=cki_legacy`,
+ `${portalPreviewURL}/?scenario=managed&service=upgrade&checkout_intent_id=cki_legacy`,
{ waitUntil: "domcontentloaded" },
);
@@ -137,17 +199,21 @@ test.describe("Pulse Account upgrade bootstrap", () => {
"Open this upgrade from the Plans page in Pulse so Pulse Account can verify the secure plan upgrade handoff before checkout.",
),
).toBeVisible();
- await expect(page.getByRole("button", { name: "Buy Annual" }).first()).toBeDisabled();
+ await expect(
+ page.getByRole("button", { name: "Buy Annual" }).first(),
+ ).toBeDisabled();
});
- test("blocks a completed secure portal handoff from reopening checkout", async ({ page }, testInfo) => {
+ test("blocks a completed secure portal handoff from reopening checkout", async ({
+ page,
+ }, testInfo) => {
test.skip(
testInfo.project.name.startsWith("mobile-"),
"Desktop-only billing continuity",
);
await page.goto(
- `${PORTAL_PREVIEW_URL}/?scenario=managed&portal_handoff_id=cph_preview_completed`,
+ `${portalPreviewURL}/?scenario=managed&portal_handoff_id=cph_preview_completed`,
{ waitUntil: "domcontentloaded" },
);
@@ -156,6 +222,8 @@ test.describe("Pulse Account upgrade bootstrap", () => {
"This secure upgrade handoff already completed. Return to the Plans page in Pulse to review the live plan state.",
),
).toBeVisible();
- await expect(page.getByRole("button", { name: "Buy Annual" }).first()).toBeDisabled();
+ await expect(
+ page.getByRole("button", { name: "Buy Annual" }).first(),
+ ).toBeDisabled();
});
});
diff --git a/tests/integration/tests/72-docker-workloads-host-filter.spec.ts b/tests/integration/tests/72-docker-workloads-host-filter.spec.ts
index 12ab9bdae3..7e16ea06bf 100644
--- a/tests/integration/tests/72-docker-workloads-host-filter.spec.ts
+++ b/tests/integration/tests/72-docker-workloads-host-filter.spec.ts
@@ -1,167 +1,23 @@
-import fs from 'node:fs';
-import path from 'node:path';
-import { fileURLToPath } from 'node:url';
-import { test as base, expect } from '@playwright/test';
-import { createAuthenticatedStorageState } from './helpers';
+import { expect, test } from '@playwright/test';
+import { ensureAuthenticated } from './helpers';
-const __dirname = path.dirname(fileURLToPath(import.meta.url));
-
-type WorkerFixtures = {
- authStorageStatePath: string;
-};
-
-const SCREENSHOT_PATH = '/tmp/docker-workloads-host-filter.png';
-
-const test = base.extend<{}, WorkerFixtures>({
- storageState: async ({ authStorageStatePath }, use) => {
- await use(authStorageStatePath);
- },
- authStorageStatePath: [
- async ({ browser }, use, workerInfo) => {
- const storageStatePath = path.resolve(
- __dirname,
- '..',
- '..',
- 'tmp',
- 'playwright-auth',
- `docker-workloads-host-filter-${workerInfo.project.name}.json`,
- );
- fs.mkdirSync(path.dirname(storageStatePath), { recursive: true });
- await createAuthenticatedStorageState(browser, storageStatePath);
- try {
- await use(storageStatePath);
- } finally {
- fs.rmSync(storageStatePath, { force: true });
- }
- },
- { scope: 'worker' },
- ],
-});
-
-test.describe('Docker workloads host filter', () => {
- test.setTimeout(180_000);
-
- test('keeps Docker related-workload links scoped to the selected runtime host', async ({
+test.describe('Docker workload route ownership', () => {
+ test('retires legacy Docker workload deep links into the runtime overview', async ({
page,
}) => {
- await page.route('**/api/resources**', async (route) => {
- const requestUrl = new URL(route.request().url());
- if (
- requestUrl.pathname !== '/api/resources' ||
- requestUrl.searchParams.get('type') !== 'vm,system-container,app-container,pod'
- ) {
- await route.continue();
- return;
- }
-
- await route.fulfill({
- status: 200,
- contentType: 'application/json',
- body: JSON.stringify({
- data: [
- {
- id: 'app-container:docker-host-1:grafana',
- type: 'app-container',
- name: 'grafana',
- status: 'running',
- lastSeen: '2026-04-28T12:00:00Z',
- sources: ['docker'],
- parentName: 'tower.local',
- metrics: {
- cpu: { value: 8, percent: 8 },
- memory: { total: 4 * 1024 * 1024 * 1024, used: 1 * 1024 * 1024 * 1024 },
- disk: { total: 40 * 1024 * 1024 * 1024, used: 10 * 1024 * 1024 * 1024 },
- netIn: { value: 1024 },
- netOut: { value: 512 },
- diskRead: { value: 128 },
- diskWrite: { value: 64 },
- },
- docker: {
- containerId: 'docker-grafana',
- hostname: 'tower.local',
- imageName: 'grafana:11',
- runtime: 'docker',
- hostSourceId: 'docker-host-1',
- },
- },
- {
- id: 'app-container:docker-host-1:prometheus',
- type: 'app-container',
- name: 'prometheus',
- status: 'running',
- lastSeen: '2026-04-28T12:00:00Z',
- sources: ['docker'],
- parentName: 'tower.local',
- metrics: {
- cpu: { value: 10, percent: 10 },
- memory: { total: 8 * 1024 * 1024 * 1024, used: 2 * 1024 * 1024 * 1024 },
- disk: { total: 80 * 1024 * 1024 * 1024, used: 20 * 1024 * 1024 * 1024 },
- netIn: { value: 2048 },
- netOut: { value: 1024 },
- diskRead: { value: 256 },
- diskWrite: { value: 128 },
- },
- docker: {
- containerId: 'docker-prometheus',
- hostname: 'tower.local',
- imageName: 'prom/prometheus:latest',
- runtime: 'podman',
- hostSourceId: 'docker-host-1',
- },
- },
- {
- id: 'app-container:docker-host-2:redis',
- type: 'app-container',
- name: 'redis',
- status: 'running',
- lastSeen: '2026-04-28T12:00:00Z',
- sources: ['docker'],
- parentName: 'edge.local',
- metrics: {
- cpu: { value: 4, percent: 4 },
- memory: { total: 2 * 1024 * 1024 * 1024, used: 512 * 1024 * 1024 },
- disk: { total: 20 * 1024 * 1024 * 1024, used: 5 * 1024 * 1024 * 1024 },
- netIn: { value: 512 },
- netOut: { value: 256 },
- diskRead: { value: 64 },
- diskWrite: { value: 32 },
- },
- docker: {
- containerId: 'docker-redis',
- hostname: 'edge.local',
- imageName: 'redis:7',
- runtime: 'docker',
- hostSourceId: 'docker-host-2',
- },
- },
- ],
- meta: {
- page: 1,
- limit: 200,
- total: 3,
- totalPages: 1,
- },
- }),
- });
- });
+ await ensureAuthenticated(page);
- await page.goto('/docker/workloads?type=app-container&platform=docker&agent=docker-host-1', {
- waitUntil: 'domcontentloaded',
- });
-
- await page.waitForURL(
- /\/docker\/workloads\?type=app-container&platform=docker&agent=docker-host-1/,
+ await page.goto(
+ '/docker/workloads?type=app-container&platform=docker&agent=docker-host-1',
+ { waitUntil: 'domcontentloaded' },
);
- await expect(page.locator('#workloads-type')).toHaveValue('app-container');
- await expect(page.locator('#workloads-platform-filter')).toHaveValue('docker');
- await expect(page.locator('#workloads-node-filter')).toHaveValue('docker-host-1');
-
- const workloadTable = page.locator('table').first();
- await expect(workloadTable).toContainText('grafana');
- await expect(workloadTable).toContainText('prometheus');
- await expect(workloadTable).not.toContainText('redis');
- await expect(page.getByText('No guests found')).toHaveCount(0);
- await page.screenshot({ path: SCREENSHOT_PATH, fullPage: true });
+ await expect(page).toHaveURL(/\/docker\/overview$/);
+ await expect(
+ page.getByRole('navigation', { name: 'Container runtime sections' }),
+ ).toBeVisible();
+ await expect(page.locator('#workloads-type')).toHaveCount(0);
+ await expect(page.locator('#workloads-platform-filter')).toHaveCount(0);
+ await expect(page.locator('#workloads-node-filter')).toHaveCount(0);
});
});
diff --git a/tests/integration/tests/73-patrol-assistant-operator-briefing.spec.ts b/tests/integration/tests/73-patrol-assistant-operator-briefing.spec.ts
index 0a1903e129..ecf060d49b 100644
--- a/tests/integration/tests/73-patrol-assistant-operator-briefing.spec.ts
+++ b/tests/integration/tests/73-patrol-assistant-operator-briefing.spec.ts
@@ -597,36 +597,6 @@ test.describe("Patrol Assistant operator briefing", () => {
exact: true,
})
.click();
- const assessmentAssistantButton = page.getByTestId(
- "patrol-assessment-assistant-button",
- );
- await expect(assessmentAssistantButton).toBeVisible();
- await assessmentAssistantButton.click();
- const assessmentAssistantContext = page.getByLabel("Assistant context");
- await expect(assessmentAssistantContext).toBeVisible();
- await expect(assessmentAssistantContext).toContainText(
- "Patrol assessment attached",
- );
- await expect(assessmentAssistantContext).toContainText(
- "live approval pending",
- );
- await expect(assessmentAssistantContext).toContainText("High risk");
- await expect(
- assessmentAssistantContext.getByRole("button", {
- name: "Review pending approvals and safest next step",
- }),
- ).toBeVisible();
- await expect(
- assessmentAssistantContext.getByText(
- "systemctl restart workload.service",
- ),
- ).toHaveCount(0);
- const dockedAssistantClose = page.getByTitle("Collapse Pulse Assistant");
- if ((await dockedAssistantClose.count()) > 0) {
- await dockedAssistantClose.first().click();
- } else {
- await page.getByLabel("Close Pulse Assistant").first().click();
- }
await page.getByText("High CPU usage").click();
const finding = page.locator("#finding-finding-operator-briefing");
diff --git a/tests/integration/tests/75-agent-integrations-surface-contract.spec.ts b/tests/integration/tests/75-agent-integrations-surface-contract.spec.ts
index f33ad5014c..b5b6d77456 100644
--- a/tests/integration/tests/75-agent-integrations-surface-contract.spec.ts
+++ b/tests/integration/tests/75-agent-integrations-surface-contract.spec.ts
@@ -130,7 +130,7 @@ test.describe("Agent integrations surface contract", () => {
page.getByRole("heading", { level: 2, name: "Create token" }),
).toBeVisible();
await expect(
- page.getByRole("button", { name: "Pulse Intelligence agent" }),
+ page.getByRole("button", { name: "Patrol external agent" }),
).toBeVisible();
});
});
diff --git a/tests/integration/tests/77-msp-isolation.spec.ts b/tests/integration/tests/77-msp-isolation.spec.ts
index a06b0a0993..b43be34ad8 100644
--- a/tests/integration/tests/77-msp-isolation.spec.ts
+++ b/tests/integration/tests/77-msp-isolation.spec.ts
@@ -79,6 +79,8 @@ async function setWebhookAllowlist(page: any, cidrs: string) {
}
test.describe('MSP isolation E2E', () => {
+ test.setTimeout(180_000);
+
test('org-bound token is scoped away from other orgs and the default org', async ({ page }) => {
await ensureAuthenticated(page);
const mtEnabled = await isMultiTenantEnabled(page);
diff --git a/tests/integration/tests/90-operational-trust-protection-posture.spec.ts b/tests/integration/tests/90-operational-trust-protection-posture.spec.ts
index c283806371..1be52ebe4b 100644
--- a/tests/integration/tests/90-operational-trust-protection-posture.spec.ts
+++ b/tests/integration/tests/90-operational-trust-protection-posture.spec.ts
@@ -1,8 +1,24 @@
-import { expect, test } from "@playwright/test";
+import { expect, test, type Page } from "@playwright/test";
import { ensureAuthenticated } from "./helpers";
const DESKTOP_VIEWPORT = { width: 1440, height: 900 };
+async function openDesktopProxmoxBackups(page: Page) {
+ const proxmoxTab = page.getByRole("tab", {
+ name: "Proxmox",
+ exact: true,
+ });
+ await expect(proxmoxTab).toBeVisible({ timeout: 30_000 });
+ await proxmoxTab.click();
+
+ const sections = page.getByRole("navigation", {
+ name: "Proxmox sections",
+ });
+ await expect(sections).toBeVisible({ timeout: 60_000 });
+ await sections.getByRole("link", { name: "Backups", exact: true }).click();
+ await expect(page).toHaveURL(/\/proxmox\/backups$/);
+}
+
test.describe("Operational trust protection posture", () => {
test.setTimeout(180_000);
@@ -23,7 +39,7 @@ test.describe("Operational trust protection posture", () => {
await page.setViewportSize(DESKTOP_VIEWPORT);
await ensureAuthenticated(page);
- await page.goto("/proxmox/backups", { waitUntil: "domcontentloaded" });
+ await openDesktopProxmoxBackups(page);
const coverageButton = page.getByRole("button", { name: "Coverage" });
await expect(coverageButton).toBeVisible({ timeout: 60_000 });
await coverageButton.click();
diff --git a/tests/integration/tests/helpers.ts b/tests/integration/tests/helpers.ts
index 31586bb189..c88f3bbc8c 100644
--- a/tests/integration/tests/helpers.ts
+++ b/tests/integration/tests/helpers.ts
@@ -210,7 +210,8 @@ type CompleteSetupWizardResult = {
username?: string;
};
-const AUTHENTICATED_URL = /\/(proxmox|nodes|hosts|docker|infrastructure)/;
+const AUTHENTICATED_URL =
+ /\/(proxmox|nodes|hosts|machines|docker|infrastructure)/;
const SETUP_COMPLETION_HANDOFFS: Record<
Exclude<SetupCompletionTarget, "none">,