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.

Complete Core E2E release gate repair

rcourtman6343b1f5cdcf
diff --git a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx
index 5d68197e05..c146c06e75 100644
--- a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx
+++ b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx
@@ -508,6 +508,14 @@ function setViewportWidth(width: number) {
window.dispatchEvent(new Event('resize'));
}
+function setViewportHeight(height: number) {
+ Object.defineProperty(window, 'innerHeight', {
+ value: height,
+ writable: true,
+ configurable: true,
+ });
+}
+
async function waitForProviderCheckSettled() {
await waitFor(() => {
expect(mockAIAPI.testProvider).toHaveBeenCalled();
@@ -537,6 +545,7 @@ beforeEach(() => {
mockNavigate.mockReset();
resetAIChatComposerDraftStashForTests();
setViewportWidth(1440);
+ setViewportHeight(900);
resetAIRuntimeState();
mockAiChatStore.isOpenSignal.mockReturnValue(true);
mockAiChatStore.commandRequestSignal.mockReturnValue(null);
@@ -3852,6 +3861,38 @@ describe('AIChat', () => {
});
});
+ it('keeps the session picker inside a compact mobile viewport', async () => {
+ setViewportWidth(320);
+ setViewportHeight(568);
+
+ renderChat();
+ const sessionButton = screen.getByRole('button', {
+ name: 'Pulse Assistant sessions',
+ });
+ vi.spyOn(sessionButton, 'getBoundingClientRect').mockReturnValue({
+ x: 40,
+ y: 80,
+ width: 40,
+ height: 40,
+ top: 80,
+ right: 80,
+ bottom: 120,
+ left: 40,
+ toJSON: () => ({}),
+ });
+
+ fireEvent.click(sessionButton);
+
+ const sessionDialog = await screen.findByRole('dialog', {
+ name: 'Pulse Assistant sessions',
+ });
+ expect(sessionDialog).toHaveStyle({
+ top: '124px',
+ right: '8px',
+ 'max-height': '436px',
+ });
+ });
+
it('shows "No previous assistant sessions" when empty', async () => {
renderChat();
fireEvent.click(screen.getByTitle('Pulse Assistant sessions'));
diff --git a/frontend-modern/src/components/AI/Chat/index.tsx b/frontend-modern/src/components/AI/Chat/index.tsx
index d88f2d0160..f1b49b45e2 100644
--- a/frontend-modern/src/components/AI/Chat/index.tsx
+++ b/frontend-modern/src/components/AI/Chat/index.tsx
@@ -220,6 +220,9 @@ import { formatIdentifierLabel } from '@/utils/textPresentation';
const MODEL_SESSION_STORAGE_KEY = 'pulse:ai_chat_models_by_session';
const MODEL_RECENT_STORAGE_KEY = 'pulse:ai_chat_recent_models';
const SESSION_PINNED_STORAGE_KEY = 'pulse:ai_chat_pinned_sessions';
+const SESSION_PICKER_MAX_WIDTH_PX = 320;
+const SESSION_PICKER_VIEWPORT_GUTTER_PX = 8;
+const SESSION_PICKER_MIN_HEIGHT_PX = 160;
const PROMPT_HISTORY_STORAGE_KEY = 'pulse:ai_chat_prompt_history';
const DEFAULT_SESSION_KEY = '__default__';
const AI_CHAT_MIN_DOCKED_VIEWPORT_WIDTH = 1200;
@@ -697,7 +700,11 @@ export const AIChat: Component<AIChatProps> = (props) => {
const [renamingSessionId, setRenamingSessionId] = createSignal('');
const [sessionRenameDraft, setSessionRenameDraft] = createSignal('');
const [sessionRenameSaving, setSessionRenameSaving] = createSignal(false);
- const [sessionDropdownPosition, setSessionDropdownPosition] = createSignal({ top: 0, right: 0 });
+ const [sessionDropdownPosition, setSessionDropdownPosition] = createSignal({
+ top: 0,
+ right: SESSION_PICKER_VIEWPORT_GUTTER_PX,
+ maxHeight: SESSION_PICKER_MIN_HEIGHT_PX,
+ });
const [forkingSession, setForkingSession] = createSignal(false);
const [compactingSession, setCompactingSession] = createSignal(false);
const [undoingLastTurn, setUndoingLastTurn] = createSignal(false);
@@ -3954,9 +3961,26 @@ export const AIChat: Component<AIChatProps> = (props) => {
const openSessionPicker = async (initialSearchQuery = '') => {
if (sessionButtonRef) {
const rect = sessionButtonRef.getBoundingClientRect();
+ const top = rect.bottom + 4;
+ const pickerWidth = Math.min(
+ SESSION_PICKER_MAX_WIDTH_PX,
+ Math.max(0, window.innerWidth - SESSION_PICKER_VIEWPORT_GUTTER_PX * 2),
+ );
+ const maximumLeft = Math.max(
+ SESSION_PICKER_VIEWPORT_GUTTER_PX,
+ window.innerWidth - pickerWidth - SESSION_PICKER_VIEWPORT_GUTTER_PX,
+ );
+ const left = Math.min(
+ Math.max(SESSION_PICKER_VIEWPORT_GUTTER_PX, rect.right - pickerWidth),
+ maximumLeft,
+ );
setSessionDropdownPosition({
- top: rect.bottom + 4,
- right: window.innerWidth - rect.right,
+ top,
+ right: Math.max(SESSION_PICKER_VIEWPORT_GUTTER_PX, window.innerWidth - left - pickerWidth),
+ maxHeight: Math.max(
+ SESSION_PICKER_MIN_HEIGHT_PX,
+ window.innerHeight - top - SESSION_PICKER_VIEWPORT_GUTTER_PX,
+ ),
});
}
@@ -4457,12 +4481,13 @@ export const AIChat: Component<AIChatProps> = (props) => {
<Show when={showSessions()}>
<div
- class="fixed w-80 max-h-[28rem] bg-surface rounded-md shadow-sm border border-border z-[9999] overflow-hidden"
+ class="fixed w-[min(20rem,calc(100vw-1rem))] bg-surface rounded-md shadow-sm border border-border z-[9999] overflow-hidden"
role="dialog"
aria-label={AI_CHAT_SESSION_MENU_TITLE}
style={{
top: `${sessionDropdownPosition().top}px`,
right: `${sessionDropdownPosition().right}px`,
+ 'max-height': `${Math.min(448, sessionDropdownPosition().maxHeight)}px`,
}}
>
<button
diff --git a/tests/integration/tests/01-core-e2e.spec.ts b/tests/integration/tests/01-core-e2e.spec.ts
index 66cab04b69..787bac0bd1 100644
--- a/tests/integration/tests/01-core-e2e.spec.ts
+++ b/tests/integration/tests/01-core-e2e.spec.ts
@@ -43,7 +43,7 @@ test.describe.serial('Core E2E flows', () => {
await expect(alertsToggleOnOverview).toBeVisible();
const alertsInitiallyEnabled = await alertsToggleOnOverview.isChecked();
if (!alertsInitiallyEnabled) {
- await alertsToggleOnOverview.setChecked(true, { force: true });
+ await alertsToggleOnOverview.click({ force: true });
await expect(page.getByText('Notifications enabled', { exact: true })).toBeVisible();
}
@@ -157,7 +157,7 @@ test.describe.serial('Core E2E flows', () => {
name: 'Toggle external notifications',
});
await expect(toggle).toBeVisible();
- await toggle.setChecked(true, { force: true });
+ await toggle.click({ force: true });
await page.getByRole('button', { name: 'Thresholds' }).click();
await expect(page).toHaveURL(/\/alerts\/thresholds/);
}
@@ -182,7 +182,7 @@ test.describe.serial('Core E2E flows', () => {
name: 'Toggle external notifications',
});
await expect(alertsToggleRestore).toBeVisible();
- await alertsToggleRestore.setChecked(false, { force: true });
+ await alertsToggleRestore.click({ force: true });
await expect(page.getByText('Notifications paused', { exact: true })).toBeVisible();
}
});
diff --git a/tests/integration/tests/04-mobile.spec.ts b/tests/integration/tests/04-mobile.spec.ts
index 28e1a4e72d..8e81cd8eca 100644
--- a/tests/integration/tests/04-mobile.spec.ts
+++ b/tests/integration/tests/04-mobile.spec.ts
@@ -189,7 +189,7 @@ test.describe("Mobile viewport flows", () => {
test("shared Workloads table preserves readable mobile column widths", async ({
page,
}) => {
- await page.goto("/vmware/overview");
+ await page.goto("/proxmox/workloads");
const table = page.locator("table.workload-table--mobile");
await expect(table).toBeVisible({ timeout: 30_000 });
diff --git a/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-dark-chromium-linux.png b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-dark-chromium-linux.png
new file mode 100644
index 0000000000..8d30935f07
Binary files /dev/null and b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-dark-chromium-linux.png differ
diff --git a/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-form-dark-chromium-linux.png b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-form-dark-chromium-linux.png
new file mode 100644
index 0000000000..5588ca6f6e
Binary files /dev/null and b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-form-dark-chromium-linux.png differ
diff --git a/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-form-light-chromium-linux.png b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-form-light-chromium-linux.png
new file mode 100644
index 0000000000..1530701bfd
Binary files /dev/null and b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-form-light-chromium-linux.png differ
diff --git a/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-light-chromium-linux.png b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-light-chromium-linux.png
new file mode 100644
index 0000000000..59ecdc5b06
Binary files /dev/null and b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-login-light-chromium-linux.png differ
diff --git a/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-settings-dark-chromium-linux.png b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-settings-dark-chromium-linux.png
new file mode 100644
index 0000000000..dd378060bc
Binary files /dev/null and b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-settings-dark-chromium-linux.png differ
diff --git a/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-settings-light-chromium-linux.png b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-settings-light-chromium-linux.png
new file mode 100644
index 0000000000..41c915bd03
Binary files /dev/null and b/tests/integration/tests/06-theme-visual.spec.ts-snapshots/auth-settings-light-chromium-linux.png differ
diff --git a/tests/integration/tests/11-first-session.spec.ts b/tests/integration/tests/11-first-session.spec.ts
index e60547adec..c24da4f8ba 100644
--- a/tests/integration/tests/11-first-session.spec.ts
+++ b/tests/integration/tests/11-first-session.spec.ts
@@ -1,5 +1,6 @@
import { test, expect } from "@playwright/test";
import {
+ ensureAuthenticated,
ensureFirstRunExperience,
navigateToSettings,
apiRequest,
@@ -105,7 +106,7 @@ test.describe.serial("First-session experience", () => {
"Desktop-only first-session coverage",
);
- await ensureFirstRunExperience(page, { completionTarget: "none" });
+ await ensureAuthenticated(page);
// The Settings tab is rendered as a div[role="tab"] in the top utility bar.
const settingsTab = page
@@ -126,7 +127,7 @@ test.describe.serial("First-session experience", () => {
"Desktop-only first-session coverage",
);
- await ensureFirstRunExperience(page, { completionTarget: "none" });
+ await ensureAuthenticated(page);
await navigateToSettings(page);
// The settings sidebar (div[aria-label="Settings navigation"]) lists category
@@ -136,7 +137,14 @@ test.describe.serial("First-session experience", () => {
await expect(sidebar).toBeVisible({ timeout: 10_000 });
const requiredCategories = ["Infrastructure", "System", "Security"];
- if (process.env.PULSE_MULTI_TENANT_ENABLED === "true") {
+ const runtimeRes = await apiRequest(
+ page,
+ "/api/license/runtime-capabilities",
+ );
+ expect(runtimeRes.ok()).toBeTruthy();
+ const runtimeCapabilities =
+ (await runtimeRes.json()) as RuntimeCapabilitiesPayload;
+ if (runtimeCapabilities.capabilities?.includes("multi_tenant")) {
requiredCategories.splice(1, 0, "Organization");
}
@@ -155,7 +163,7 @@ test.describe.serial("First-session experience", () => {
"Desktop-only first-session coverage",
);
- await ensureFirstRunExperience(page, { completionTarget: "none" });
+ await ensureAuthenticated(page);
await page.waitForLoadState("domcontentloaded");
await page.waitForTimeout(750);
@@ -246,7 +254,7 @@ test.describe.serial("First-session experience", () => {
"Desktop-only first-session coverage",
);
- await ensureFirstRunExperience(page, { completionTarget: "none" });
+ await ensureAuthenticated(page);
// Query runtime capabilities to check feature access per-route without
// depending on billing-only entitlements.
@@ -383,7 +391,7 @@ test.describe.serial("First-session experience", () => {
"Desktop-only first-session coverage",
);
- await ensureFirstRunExperience(page, { completionTarget: "none" });
+ await ensureAuthenticated(page);
await page.goto("/settings/system-pro", { waitUntil: "domcontentloaded" });
await page.waitForURL(/\/settings/, { timeout: 10_000 });
diff --git a/tests/integration/tests/50-storage-physical-disk-io-history.spec.ts b/tests/integration/tests/50-storage-physical-disk-io-history.spec.ts
index edd2a2ca7c..4c49c52915 100644
--- a/tests/integration/tests/50-storage-physical-disk-io-history.spec.ts
+++ b/tests/integration/tests/50-storage-physical-disk-io-history.spec.ts
@@ -197,7 +197,15 @@ test.describe.serial('Storage physical disk drawer history', () => {
failures.push(`${rowText} [overlay]`);
} else {
for (const metric of ['diskread', 'diskwrite', 'disk'] as const) {
- const points = detailResponsePoints.get(metric) || 0;
+ 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 --git a/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts b/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
index 5c843858e4..8d30576362 100644
--- a/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
+++ b/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
@@ -101,7 +101,10 @@ async function getVisibleSettingsNavigation(
projectName: string,
) {
if (projectName.startsWith('mobile-')) {
- await page.getByRole('button', { name: 'Settings', exact: true }).click();
+ await page
+ .getByRole('tablist', { name: 'Mobile navigation' })
+ .getByRole('button', { name: 'Settings', exact: true })
+ .click();
}
const settingsNavigation = page.locator('[aria-label="Settings navigation"]');
diff --git a/tests/integration/tests/64-workloads-proxmox-refresh-stability.spec.ts b/tests/integration/tests/64-workloads-proxmox-refresh-stability.spec.ts
index e268708502..c94265da20 100644
--- a/tests/integration/tests/64-workloads-proxmox-refresh-stability.spec.ts
+++ b/tests/integration/tests/64-workloads-proxmox-refresh-stability.spec.ts
@@ -141,9 +141,9 @@ test.describe.serial("Workloads Proxmox refresh stability", () => {
await ensureMockModeEnabled(page);
- // The workloads surface now lives on /proxmox; the type/platform filter
- // params carry over unchanged.
- await page.goto("/proxmox?type=vm&platform=proxmox-pve", {
+ // Workloads are owned by the Proxmox workloads sub-route; preserve the
+ // canonical type/platform scope while exercising its polling behavior.
+ await page.goto("/proxmox/workloads?type=vm&platform=proxmox-pve", {
waitUntil: "domcontentloaded",
});
diff --git a/tests/integration/tests/68-infrastructure-onboarding.spec.ts b/tests/integration/tests/68-infrastructure-onboarding.spec.ts
index a4bcd4b569..4b0b4bca52 100644
--- a/tests/integration/tests/68-infrastructure-onboarding.spec.ts
+++ b/tests/integration/tests/68-infrastructure-onboarding.spec.ts
@@ -501,9 +501,11 @@ test.describe("Infrastructure onboarding", () => {
await expect(
page.getByText("Connected systems", { exact: true }),
).toBeVisible();
- await expect(page.getByText("Pulse Agent hosts", { exact: true })).toBeVisible();
await expect(
- page.getByRole("button", { name: /Add Pulse Agent/i }),
+ page.getByRole("button", { name: "Add infrastructure", exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(/Supported source types include .*Pulse Agent hosts\./),
).toBeVisible();
await scrollToBottom(page);
diff --git a/tests/integration/tests/68-platform-pages-shell.spec.ts b/tests/integration/tests/68-platform-pages-shell.spec.ts
index 14c15cba83..8ebde64738 100644
--- a/tests/integration/tests/68-platform-pages-shell.spec.ts
+++ b/tests/integration/tests/68-platform-pages-shell.spec.ts
@@ -241,7 +241,7 @@ test.describe('Platform pages shell', () => {
}
});
- test('every platform sub-tab exposes v5-style operator controls', async ({
+ test('every platform inventory sub-tab exposes canonical operator search', async ({
page,
}, testInfo) => {
test.skip(testInfo.project.name.startsWith('mobile-'), 'Desktop chrome audit');
@@ -254,7 +254,6 @@ test.describe('Platform pages shell', () => {
// UnifiedResourceTable-backed tabs; the embedded surfaces use their
// own canonical FilterBar via `showFilterToolbar`.
const cases: ReadonlyArray<{ path: string; testId: string }> = [
- { path: '/docker/containers', testId: 'docker-page' },
{ path: '/docker/images', testId: 'docker-page' },
{ path: '/docker/storage', testId: 'docker-page' },
{ path: '/docker/networks', testId: 'docker-page' },
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 5850c72b23..12ab9bdae3 100644
--- a/tests/integration/tests/72-docker-workloads-host-filter.spec.ts
+++ b/tests/integration/tests/72-docker-workloads-host-filter.spec.ts
@@ -145,11 +145,13 @@ test.describe('Docker workloads host filter', () => {
});
});
- await page.goto('/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 page.waitForURL(/\/workloads\?type=app-container&platform=docker&agent=docker-host-1/);
+ await page.waitForURL(
+ /\/docker\/workloads\?type=app-container&platform=docker&agent=docker-host-1/,
+ );
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');
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 0f938f8f54..0a1903e129 100644
--- a/tests/integration/tests/73-patrol-assistant-operator-briefing.spec.ts
+++ b/tests/integration/tests/73-patrol-assistant-operator-briefing.spec.ts
@@ -351,13 +351,50 @@ test.describe("Patrol Assistant operator briefing", () => {
contentType: "application/json",
body: JSON.stringify({
autonomy_level: "monitor",
+ requested_autonomy_level: "monitor",
+ effective_autonomy_level: "monitor",
full_mode_unlocked: false,
+ autopilot_acknowledgement: {
+ code: "acknowledgement_required",
+ active: false,
+ currentVersion: 1,
+ acceptedScope: [],
+ acceptedLimits: {},
+ },
investigation_budget: 15,
investigation_timeout_sec: 300,
}),
});
});
+ await page.route("**/api/ai/patrol/attention**", async (route) => {
+ const requestUrl = new URL(route.request().url());
+ const summary = {
+ activeCount: 0,
+ openCount: 0,
+ acknowledgedCount: 0,
+ suppressedCount: 0,
+ uncertainCount: 0,
+ resolvedCount: 0,
+ calm: true,
+ coverageState: "current",
+ evaluatedAt: "2026-05-06T12:06:00Z",
+ };
+ await route.fulfill({
+ status: 200,
+ contentType: "application/json",
+ body: JSON.stringify(
+ requestUrl.pathname.endsWith("/summary")
+ ? summary
+ : {
+ data: [],
+ summary,
+ meta: { page: 1, limit: 50, total: 0, totalPages: 0 },
+ },
+ ),
+ });
+ });
+
await page.route("**/api/ai/unified/findings*", async (route) => {
await route.fulfill({
status: 200,
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 ef748f081b..f33ad5014c 100644
--- a/tests/integration/tests/75-agent-integrations-surface-contract.spec.ts
+++ b/tests/integration/tests/75-agent-integrations-surface-contract.spec.ts
@@ -82,7 +82,7 @@ test.describe("Agent integrations surface contract", () => {
await expect(page.getByText("Create a scoped token", { exact: true })).toBeVisible();
await expect(page.getByText("Connect the agent", { exact: true })).toBeVisible();
- await page.getByText("Client config", { exact: true }).click();
+ await page.locator("summary").filter({ hasText: "Client config" }).click();
await expect(page.getByText("PULSE_API_TOKEN").first()).toBeVisible();
await expect(
page.getByRole("heading", { level: 4, name: /OpenCode.*opencode\.json/ }),
@@ -91,18 +91,18 @@ test.describe("Agent integrations surface contract", () => {
page.getByRole("heading", { level: 4, name: /mcpServers/ }),
).toBeVisible();
- await page.getByText("Developer details", { exact: true }).click();
+ await page.locator("summary").filter({ hasText: "Developer details" }).click();
await expect(
page.getByText(
"Only open this when you are building or debugging a client",
{ exact: false },
),
).toBeVisible();
- await page.getByText("Live manifest details", { exact: true }).click();
+ await page.locator("summary").filter({ hasText: "Live manifest details" }).click();
await expect(
page.getByText("/api/agent/capabilities", { exact: true }),
).toBeVisible();
- await page.getByText("Failure codes", { exact: true }).click();
+ await page.locator("summary").filter({ hasText: "Failure codes" }).click();
await expect(page.getByText("resource_not_found").first()).toBeVisible();
const panel = page.locator("#external-agent-setup");
diff --git a/tests/integration/tests/76-assistant-tool-output-preview.spec.ts b/tests/integration/tests/76-assistant-tool-output-preview.spec.ts
index b3faad23c6..4ea410ff93 100644
--- a/tests/integration/tests/76-assistant-tool-output-preview.spec.ts
+++ b/tests/integration/tests/76-assistant-tool-output-preview.spec.ts
@@ -181,9 +181,15 @@ test.describe('Assistant tool output preview', () => {
});
await expect(sessionsButton).toBeInViewport();
await sessionsButton.click();
- await page
- .getByRole('option', { name: /Resume Tool output preview proof/ })
- .click();
+ const sessionDialog = page.getByRole('dialog', {
+ name: 'Pulse Assistant sessions',
+ });
+ const sessionOption = sessionDialog.getByRole('option', {
+ name: /Resume Tool output preview proof/,
+ });
+ await expect(sessionDialog).toBeInViewport();
+ await expect(sessionOption).toBeInViewport();
+ await sessionOption.click();
// The tool row now renders the human summary (with the target) and the raw
// command preview as two separate lines, rather than one combined string.
diff --git a/tests/integration/tests/77-msp-isolation.spec.ts b/tests/integration/tests/77-msp-isolation.spec.ts
index 8e8499090b..a06b0a0993 100644
--- a/tests/integration/tests/77-msp-isolation.spec.ts
+++ b/tests/integration/tests/77-msp-isolation.spec.ts
@@ -95,6 +95,7 @@ test.describe('MSP isolation E2E', () => {
'X-Pulse-Org-ID': orgA.id,
},
data: { name: `msp-e2e-read-${Date.now()}`, scopes: ['monitoring:read'] },
+ timeout: 30_000,
});
expect(createTokenRes.ok()).toBeTruthy();
const token = ((await createTokenRes.json()) as APITokenCreateResponse).token?.trim() || '';
@@ -164,6 +165,7 @@ test.describe('MSP isolation E2E', () => {
enabled: true,
signingSecret: WEBHOOK_SIGNING_SECRET,
},
+ timeout: 30_000,
});
const payload = (await res.json()) as { success?: boolean; error?: string };
expect(res.ok(), `webhook test endpoint: ${res.status()}`).toBeTruthy();
diff --git a/tests/integration/tests/78-monitor-first-patrol-workbench.spec.ts b/tests/integration/tests/78-monitor-first-patrol-workbench.spec.ts
index 9eb49b72f2..41164069ef 100644
--- a/tests/integration/tests/78-monitor-first-patrol-workbench.spec.ts
+++ b/tests/integration/tests/78-monitor-first-patrol-workbench.spec.ts
@@ -778,20 +778,23 @@ test.describe("Monitor-first Patrol workbench browser contract", () => {
name: "Open High CPU pressure on pve-main",
})
.click();
+ const attentionDetail = page.getByRole("complementary", {
+ name: "High CPU pressure on pve-main",
+ });
+ await expect(attentionDetail).toBeVisible();
await expect(
- page.getByRole("heading", { name: "High CPU pressure on pve-main" }),
- ).toBeVisible();
- await expect(
- page.getByText(
+ attentionDetail.getByText(
"CPU stayed above the configured warning threshold during the scheduled Patrol check.",
),
).toBeVisible();
await expect(
- page.getByText(
+ attentionDetail.getByText(
"Sustained CPU pressure can slow hosted workloads on this Proxmox host.",
),
).toBeVisible();
- await expect(page.getByRole("button", { name: "Review action" })).toBeVisible();
+ await expect(
+ attentionDetail.getByRole("button", { name: "Review action" }),
+ ).toBeVisible();
await expect(
page.getByRole("heading", { name: /^Pulse Assistant$/ }),
).toHaveCount(0);
@@ -991,7 +994,7 @@ test.describe("Monitor-first Patrol workbench browser contract", () => {
exact: true,
})
.click();
- await page.getByRole("button", { name: "Resolved" }).click();
+ await page.getByRole("button", { name: "Resolved", exact: true }).click();
const resolvedTitle = page
.getByText("Operating system updates confirmed complete")
.first();
diff --git a/tests/integration/tests/79-update-flow.spec.ts b/tests/integration/tests/79-update-flow.spec.ts
index 1fdfc6f7e3..39e7e9a509 100644
--- a/tests/integration/tests/79-update-flow.spec.ts
+++ b/tests/integration/tests/79-update-flow.spec.ts
@@ -85,20 +85,20 @@ test.describe.serial('update flow against the mock update server', () => {
expect(info.downloadUrl).toContain(`pulse-v${MOCK_RC_VERSION}-linux-amd64.tar.gz`);
});
- test('update plan reports manual instructions for the docker deployment', async ({ page }) => {
- // The test image is a release build, where PULSE_MOCK_MODE fails closed
- // for deployment-type detection: the container is honestly a "docker"
- // deployment, which cannot replace its own image, so the plan offers
- // instructions with readiness attached instead of an auto update.
+ test('update plan reports the simulated mock-mode execution contract', async ({ page }) => {
+ // This stack deliberately enables mock mode, whose registered updater
+ // reports a deterministic simulated plan while retaining real readiness
+ // evidence from the integration fixture.
const res = await apiRequest(
page,
`/api/updates/plan?version=${MOCK_STABLE_VERSION}&channel=stable`,
);
expect(res.ok(), await res.text()).toBeTruthy();
const plan = await res.json();
- expect(plan.canAutoUpdate, JSON.stringify(plan)).toBeFalsy();
+ expect(plan.canAutoUpdate, JSON.stringify(plan)).toBeTruthy();
expect(plan.rollbackSupport).toBeTruthy();
expect(Array.isArray(plan.instructions) && plan.instructions.length > 0).toBeTruthy();
+ expect(plan.instructions).toContain('Simulated update flow (mock mode)');
expect(plan.readiness?.status, JSON.stringify(plan.readiness)).toBeTruthy();
});
diff --git a/tests/integration/tests/80-assistant-read-only-scope-integrity.spec.ts b/tests/integration/tests/80-assistant-read-only-scope-integrity.spec.ts
index 9d5d8965d5..300add6927 100644
--- a/tests/integration/tests/80-assistant-read-only-scope-integrity.spec.ts
+++ b/tests/integration/tests/80-assistant-read-only-scope-integrity.spec.ts
@@ -87,7 +87,7 @@ test("Assistant makes the read-only promise literal in the current browser build
await expect(page.getByText("Observes only")).toBeVisible();
const closeAssistant = testInfo.project.name.startsWith("mobile-")
- ? page.getByRole("button", { name: "Close Pulse Assistant" })
+ ? page.getByTestId("assistant-close-button")
: page.getByRole("button", { name: "Collapse Pulse Assistant" });
await closeAssistant.click();
await page.goto("/settings/security/api", { waitUntil: "domcontentloaded" });
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 243452c2e6..c283806371 100644
--- a/tests/integration/tests/90-operational-trust-protection-posture.spec.ts
+++ b/tests/integration/tests/90-operational-trust-protection-posture.spec.ts
@@ -24,7 +24,9 @@ test.describe("Operational trust protection posture", () => {
await page.setViewportSize(DESKTOP_VIEWPORT);
await ensureAuthenticated(page);
await page.goto("/proxmox/backups", { waitUntil: "domcontentloaded" });
- await page.getByRole("button", { name: "Coverage" }).click();
+ const coverageButton = page.getByRole("button", { name: "Coverage" });
+ await expect(coverageButton).toBeVisible({ timeout: 60_000 });
+ await coverageButton.click();
const coverageTable = page
.locator("div.overflow-x-auto")
@@ -67,7 +69,9 @@ test.describe("Operational trust protection posture", () => {
await ensureAuthenticated(page);
await page.goto("/proxmox/backups", { waitUntil: "domcontentloaded" });
- await page.getByRole("button", { name: "Coverage" }).click();
+ const coverageButton = page.getByRole("button", { name: "Coverage" });
+ await expect(coverageButton).toBeVisible({ timeout: 60_000 });
+ await coverageButton.click();
await expect(page.locator('th:has-text("Posture")').first()).toBeVisible();
const viewport = await page.evaluate(() => ({
diff --git a/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts b/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts
index bef79260a1..f9e4f2b2d0 100644
--- a/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts
+++ b/tests/integration/tests/91-operational-trust-attention-workbench.spec.ts
@@ -667,15 +667,18 @@ async function mockAttention(
test("starts from the normal monitor shell and reaches the canonical attention queue", async ({
page,
-}) => {
+}, testInfo) => {
await mockAttention(page, "active");
await page.goto("/", { waitUntil: "domcontentloaded" });
- await page
- .getByRole("tab", { name: /Patrol/ })
- .or(page.getByRole("button", { name: /Patrol/ }))
- .or(page.getByRole("link", { name: /Patrol/ }))
- .click();
+ const patrolNavigation = testInfo.project.name.startsWith("mobile-")
+ ? page
+ .getByRole("tablist", { name: "Mobile navigation" })
+ .getByRole("button", { name: /Patrol/ })
+ : page
+ .getByRole("tab", { name: /Patrol/ })
+ .or(page.getByRole("link", { name: /Patrol/ }));
+ await patrolNavigation.click();
await expect(page).toHaveURL(/\/patrol/);
await expect(