Publish ITWorx Pulse source
Public source validation / validate (push) Failing after 3m8s

This commit is contained in:
ITWorx Pulse release export
2026-09-03 02:09:19 +02:00
commit bd774932d5
614 changed files with 77116 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import AxeBuilder from '@axe-core/playwright';
import { expect, test } from '@playwright/test';
const enabled = Boolean(process.env.PULSE_E2E_REAL_BASE_URL);
test('persisted capacity history produces one qualified explainable forecast', async ({ page }) => {
test.skip(!enabled, 'Requires an isolated real Pulse stack.');
expect((await page.request.get('/auth/test-login')).ok()).toBeTruthy();
const response = await page.request.get('/api/v1/forecasts');
expect(response.ok()).toBeTruthy();
const snapshot = await response.json() as { qualifiedCount: number; items: Array<{ entityId: string; dataPoints: number; confidence: string; projectedAt?: string }> };
expect(snapshot.qualifiedCount).toBe(1);
expect(snapshot.items[0]).toMatchObject({ dataPoints: 3, confidence: 'medium' });
expect(snapshot.items[0].projectedAt).toBeTruthy();
await page.goto('/capacity');
await expect(page.getByText(/1 gekwalificeerde prognoses/)).toBeVisible();
await expect(page.getByRole('heading', { name: 'Media forecast' })).toBeVisible();
await expect(page.getByText('Mediane dagelijkse groei', { exact: true })).toBeVisible();
await expect(page.getByText('Gemiddelde betrouwbaarheid')).toBeVisible();
await expect(page.getByText('42 dagen', { exact: false })).toBeVisible();
await expect(page.getByText('0 B / 0 B')).toHaveCount(0);
expect(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth + 1)).toBe(true);
const axe = await new AxeBuilder({ page }).analyze();
expect(axe.violations.filter((item) => item.impact === 'serious' || item.impact === 'critical')).toEqual([]);
});