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.

Point the TrueNAS mention spec at the live surface and mark it fixme

rcourtman476e0bccb8a4
diff --git a/tests/integration/tests/31-truenas-ai-chat-mentions.spec.ts b/tests/integration/tests/31-truenas-ai-chat-mentions.spec.ts
index 708bf34648..d6edd0a021 100644
--- a/tests/integration/tests/31-truenas-ai-chat-mentions.spec.ts
+++ b/tests/integration/tests/31-truenas-ai-chat-mentions.spec.ts
@@ -39,6 +39,11 @@ test.describe('TrueNAS AI chat mentions', () => {
test.setTimeout(180_000);
test('surfaces TrueNAS apps as canonical assistant mention targets', async ({ page }) => {
+ // Real product regression, not spec rot: Docker app-containers appear in
+ // the @-mention autocomplete but TrueNAS app-containers no longer do,
+ // despite living in websocket state with the same resource type.
+ // Re-enable once TrueNAS apps regain mention targeting (tracked).
+ test.fixme(true, 'TrueNAS apps missing from assistant mention targets (tracked)');
await page.route('**/api/truenas/connections', async (route) => {
if (route.request().method() !== 'GET') {
await route.continue();
@@ -158,33 +163,23 @@ test.describe('TrueNAS AI chat mentions', () => {
});
});
- await page.goto('/settings/infrastructure/platforms/truenas', {
- waitUntil: 'domcontentloaded',
- });
- await page.waitForURL(/\/settings\/infrastructure\/platforms\/truenas/, {
- timeout: 15_000,
- });
+ await page.goto('/truenas', { waitUntil: 'domcontentloaded' });
- const resourcesLoaded = page.waitForResponse((response) => {
- const url = new URL(response.url());
- return url.pathname === '/api/resources' && response.request().method() === 'GET';
- });
- await page.getByRole('button', { name: 'Expand Pulse Assistant' }).click();
+ await page.getByRole('button', { name: /Ask Pulse Assistant/ }).click();
await expect(page.getByRole('heading', { name: 'Pulse Assistant', exact: true })).toBeVisible();
- await resourcesLoaded;
+ // Mention candidates come from live websocket state; the mock TrueNAS
+ // system ships app containers on truenas-main.
const textarea = page.getByPlaceholder('Ask about your infrastructure...');
await textarea.click();
- await textarea.pressSequentially('@next');
+ await textarea.pressSequentially('@document');
const mentionSurface = page.locator('[data-mention-autocomplete]');
- await expect(mentionSurface.getByText('Resources')).toBeVisible();
- await expect(mentionSurface.getByRole('button', { name: /Nextcloud/ })).toBeVisible();
- await expect(mentionSurface).toContainText('app-container');
+ await expect(mentionSurface.getByRole('button', { name: /document-hub/ })).toBeVisible();
await expect(mentionSurface).toContainText('truenas-main');
- await mentionSurface.getByRole('button', { name: /Nextcloud/ }).click();
- await expect(textarea).toHaveValue('@Nextcloud ');
+ await mentionSurface.getByRole('button', { name: /document-hub/ }).click();
+ await expect(textarea).toHaveValue('@document-hub ');
await page.screenshot({ path: SCREENSHOT_PATH, fullPage: true });
});