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.

Re-pin three live-gate straggler specs against current surfaces

rcourtmanaa4de54d4203
diff --git a/tests/integration/tests/67-tls-verification-warning-banners.spec.ts b/tests/integration/tests/67-tls-verification-warning-banners.spec.ts
index bea7fe1c1e..a3f62d01e7 100644
--- a/tests/integration/tests/67-tls-verification-warning-banners.spec.ts
+++ b/tests/integration/tests/67-tls-verification-warning-banners.spec.ts
@@ -220,15 +220,16 @@ test.describe("TLS verification warning banners", () => {
}) => {
await mockVMwareConnections(page);
- await page.goto("/settings/infrastructure", {
+ // The add dialog\'s per-platform buttons were replaced by a
+ // detect-or-agent chooser; ?add=vmware deep-links straight to the VMware
+ // credential slot (ADD_STEP_TO_TYPE in infrastructureWorkspaceModel).
+ await page.goto("/settings/infrastructure?add=vmware", {
waitUntil: "domcontentloaded",
});
- await page.waitForURL(/\/settings\/infrastructure/, {
+ await page.waitForURL(/\/settings\/infrastructure\?add=vmware/, {
timeout: 15_000,
});
- await page.getByRole("button", { name: "Add infrastructure" }).click();
- await page.getByRole("button", { name: "VMware" }).click();
await page.getByLabel("Skip TLS verification").check();
const warning = page.getByRole("alert").filter({
@@ -248,15 +249,13 @@ test.describe("TLS verification warning banners", () => {
}) => {
await mockTrueNASConnections(page);
- await page.goto("/settings/infrastructure", {
+ await page.goto("/settings/infrastructure?add=truenas", {
waitUntil: "domcontentloaded",
});
- await page.waitForURL(/\/settings\/infrastructure/, {
+ await page.waitForURL(/\/settings\/infrastructure\?add=truenas/, {
timeout: 15_000,
});
- await page.getByRole("button", { name: "Add infrastructure" }).click();
- await page.getByRole("button", { name: "TrueNAS" }).click();
await page.getByLabel("Skip TLS verification").check();
const warning = page.getByRole("alert").filter({
@@ -282,7 +281,7 @@ test.describe("TLS verification warning banners", () => {
await page.waitForURL(/\/alerts\/destinations/, { timeout: 15_000 });
await expect(
- page.getByRole("heading", { level: 1, name: "Notification Destinations" }),
+ page.getByRole("heading", { level: 1, name: "Notifications" }),
).toBeVisible();
await page.getByLabel("Allow self-signed certificates").check();
diff --git a/tests/integration/tests/68-platform-pages-shell.spec.ts b/tests/integration/tests/68-platform-pages-shell.spec.ts
index f1bb3305f1..14c15cba83 100644
--- a/tests/integration/tests/68-platform-pages-shell.spec.ts
+++ b/tests/integration/tests/68-platform-pages-shell.spec.ts
@@ -49,11 +49,13 @@ type PlatformPageCase = {
// empty under the default mock fixtures.
populatedTabPaths?: readonly string[];
populatedRowSelectors?: Partial<Record<string, string>>;
+ emptyStateTitle: string;
};
const PLATFORM_PAGES: readonly PlatformPageCase[] = [
{
id: 'kubernetes',
+ emptyStateTitle: 'No Kubernetes clusters',
rootPath: '/kubernetes',
testId: 'kubernetes-page',
ariaLabel: 'Kubernetes sections',
@@ -78,6 +80,7 @@ const PLATFORM_PAGES: readonly PlatformPageCase[] = [
},
{
id: 'truenas',
+ emptyStateTitle: 'No TrueNAS systems',
rootPath: '/truenas',
testId: 'truenas-page',
ariaLabel: 'TrueNAS sections',
@@ -111,6 +114,7 @@ const PLATFORM_PAGES: readonly PlatformPageCase[] = [
},
{
id: 'vmware',
+ emptyStateTitle: 'No vSphere hosts',
rootPath: '/vmware',
testId: 'vmware-page',
ariaLabel: 'VMware sections',
@@ -161,11 +165,22 @@ test.describe('Platform pages shell', () => {
const pageRoot = page.getByTestId(platform.testId);
await expect(pageRoot).toBeVisible({ timeout: 30_000 });
+ // Sub-tabs are inventory-gated (64cbdd6e4 "Gate platform workflow tabs
+ // by inventory"). Platforms whose fixtures reach the store over the
+ // websocket still render the full sub-tab chrome; a platform with no
+ // connected instance (e.g. TrueNAS with no configured connection) shows
+ // the empty-state card instead of chrome. Accept either, but require the
+ // page to land in one coherent state, not blank.
const sectionNav = page.getByRole('navigation', { name: platform.ariaLabel });
- await expect(sectionNav).toBeVisible();
+ const emptyState = pageRoot.getByText(platform.emptyStateTitle, { exact: true });
+ await expect(sectionNav.or(emptyState).first()).toBeVisible({ timeout: 30_000 });
- for (const tabPath of platform.tabPaths) {
- await expect(sectionNav.locator(`a[href="${tabPath}"]`)).toBeVisible();
+ if ((await sectionNav.count()) > 0 && (await sectionNav.isVisible())) {
+ for (const tabPath of platform.tabPaths) {
+ await expect(sectionNav.locator(`a[href="${tabPath}"]`)).toBeVisible();
+ }
+ } else {
+ await expect(emptyState).toBeVisible();
}
});
@@ -212,9 +227,11 @@ test.describe('Platform pages shell', () => {
name: 'Container runtime sections',
});
await expect(sectionNav).toBeVisible();
+ // Containers collapsed into Overview (1f66a2f93 "Collapse Docker page to
+ // single unified surface"); Overview owns runtime hosts plus primary
+ // container workloads.
for (const tabPath of [
'/docker/overview',
- '/docker/containers',
'/docker/images',
'/docker/storage',
'/docker/networks',
diff --git a/tests/integration/tests/69-diagnostics-onboarding.spec.ts b/tests/integration/tests/69-diagnostics-onboarding.spec.ts
index 284cfb84f2..8f307545c0 100644
--- a/tests/integration/tests/69-diagnostics-onboarding.spec.ts
+++ b/tests/integration/tests/69-diagnostics-onboarding.spec.ts
@@ -336,7 +336,12 @@ async function auditHorizontalOverflow(page: Page): Promise<OverflowAudit> {
test.describe('Diagnostics onboarding analytics', () => {
test.setTimeout(180_000);
- test('desktop diagnostics renders the onboarding analytics card in the shared settings shell', async ({
+ // The Commercial Funnel and Infrastructure Onboarding analytics cards were
+ // deliberately removed from the user-facing diagnostics page (c6bcad255,
+ // "Remove internal analytics from diagnostics"); the UI strips
+ // commercialFunnel and infrastructureOnboarding from the payload before both
+ // rendering and export. These specs pin that boundary.
+ test('keeps internal onboarding analytics out of the rendered diagnostics page', async ({
page,
}, testInfo) => {
test.skip(testInfo.project.name.startsWith('mobile-'), 'Desktop-only diagnostics shell coverage');
@@ -349,16 +354,14 @@ test.describe('Diagnostics onboarding analytics', () => {
await expect(page.getByRole('heading', { name: 'Diagnostics & Health' })).toBeVisible();
await page.getByRole('button', { name: 'Run Diagnostics', exact: true }).first().click();
- await expect(page.getByText('Commercial Funnel', { exact: true })).toBeVisible();
- await expect(page.getByText('Infrastructure Onboarding', { exact: true })).toBeVisible();
- await expect(page.getByText('Credentials Opened', { exact: true })).toBeVisible();
- await expect(page.getByText('TrueNAS SCALE', { exact: true })).toBeVisible();
- await expect(page.getByText('API', { exact: true })).toBeVisible();
- await expect(
- page.getByText('More probed addresses miss than detect a supported API-backed platform.', {
- exact: true,
- }),
- ).toBeVisible();
+ // The run completed and the payload rendered (metrics-store card proves it).
+ await expect(page.getByText('Metrics Store', { exact: false }).first()).toBeVisible({
+ timeout: 30_000,
+ });
+
+ await expect(page.getByText('Commercial Funnel', { exact: true })).toHaveCount(0);
+ await expect(page.getByText('Infrastructure Onboarding', { exact: true })).toHaveCount(0);
+ await expect(page.getByText('Credentials Opened', { exact: true })).toHaveCount(0);
});
test('desktop diagnostics exports full and sanitized onboarding analytics JSON', async ({
@@ -372,7 +375,10 @@ test.describe('Diagnostics onboarding analytics', () => {
await page.waitForURL(/\/settings\/support\/diagnostics$/, { timeout: 15_000 });
await page.getByRole('button', { name: 'Run Diagnostics', exact: true }).first().click();
- await expect(page.getByText('Infrastructure Onboarding', { exact: true })).toBeVisible();
+ // Wait for a rendered card that survives the analytics strip.
+ await expect(page.getByText('Metrics Store', { exact: false }).first()).toBeVisible({
+ timeout: 30_000,
+ });
const [fullDownload] = await Promise.all([
page.waitForEvent('download'),
@@ -389,14 +395,12 @@ test.describe('Diagnostics onboarding analytics', () => {
expect(fullPayload.nodes[0]?.host).toBe('10.0.0.5');
expect(fullPayload.discovery?.configuredSubnet).toBe('10.0.0.0/24');
- expect(fullPayload.infrastructureOnboarding?.summary.credentials_opened).toBe(1);
- expect(fullPayload.infrastructureOnboarding?.platforms).toEqual([
- expect.objectContaining({
- key: 'truenas',
- catalog_selected: 2,
- credentials_opened: 1,
- }),
- ]);
+ // Internal analytics are stripped from the full export too, not just the
+ // rendered card.
+ expect(fullPayload.infrastructureOnboarding).toBeUndefined();
+ expect(
+ (fullPayload as Record<string, unknown>).commercialFunnel,
+ ).toBeUndefined();
const [sanitizedDownload] = await Promise.all([
page.waitForEvent('download'),
@@ -426,13 +430,10 @@ test.describe('Diagnostics onboarding analytics', () => {
}),
);
expect(sanitizedPayload.errors).toEqual(['probe failed for [REDACTED_IP] after timeout']);
- expect(sanitizedPayload.infrastructureOnboarding?.summary).toEqual(
- expect.objectContaining({
- opened: 4,
- api_path_selected: 2,
- credentials_opened: 1,
- }),
- );
+ expect(sanitizedPayload.infrastructureOnboarding).toBeUndefined();
+ expect(
+ (sanitizedPayload as Record<string, unknown>).commercialFunnel,
+ ).toBeUndefined();
});
test('mobile diagnostics keeps the populated onboarding analytics page inside the viewport', async ({
@@ -446,7 +447,9 @@ test.describe('Diagnostics onboarding analytics', () => {
await page.waitForURL(/\/settings\/support\/diagnostics$/, { timeout: 15_000 });
await page.getByRole('button', { name: 'Run', exact: true }).click();
- await expect(page.getByText('Infrastructure Onboarding', { exact: true })).toBeVisible();
+ await expect(page.getByText('Metrics Store', { exact: false }).first()).toBeVisible({
+ timeout: 30_000,
+ });
await scrollToBottom(page);
const audit = await auditHorizontalOverflow(page);