2e29b611c9
Phase 1A — Haftungs-kritische Fixes: - SIL/PL-Badges als "Vorab-Einschaetzung" mit Tooltip gekennzeichnet - Coverage-Disclaimer in CE-Akte, Projekt-Uebersicht und Print-Export - Norm-Referenzen: 42 Kapitelverweise durch Themen-Deskriptoren ersetzt Phase 1B — Massnahmen-Verkabelung: - 16 neue Massnahmen (M201-M216) fuer bisher unabgedeckte Kategorien (communication_failure, hmi_error, firmware_corruption, maintenance, sensor_fault, mode_confusion) - Kategorie-Fallback im Initialize-Endpoint: ordnet Massnahmen aus der Bibliothek automatisch per HazardCategory zu (max 8 pro Kategorie) - Total: 225 → 241 Massnahmen, 0 Kategorien ohne Massnahmen Phase 1C — Explainability Engine: - MatchReason Struct in PatternMatch (type, tag, met) - Pattern Engine schreibt fuer jeden Match strukturierte Begruendungen - Frontend zeigt "Erkannt weil: Komponente X, Energie Y, Kein Ausschluss Z" Weitere Aenderungen: - BAuA/OSHA Regulatory Hints: 3 Enrich-Endpoints (per Hazard, per Measure, Batch) - Dokumente-Tab in IACE-Bibliothek (36.708 Chunks aus Qdrant) - Varianten-UX: Basis-Projekt-Summary auf Varianten-Seite - Projekt-Initialisierung: POST /initialize kettet Parse→Komponenten→Patterns→Hazards→Massnahmen→Normen - 18 pre-existing TS-Fehler gefixt, Route-Konflikt behoben - Component-Library + Measures-Library Tests aktualisiert Tests: Go alle bestanden, TS 0 Fehler, Playwright 141+ bestanden Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
79 lines
3.2 KiB
TypeScript
79 lines
3.2 KiB
TypeScript
import { test, expect } from '@playwright/test'
|
|
|
|
const BASE = 'https://macmini:3007'
|
|
const PROJECT_ID = '50d16b08-d21c-450a-af62-222f1949acf9' // Kniehebelpresse
|
|
|
|
test.describe('IACE Project — All Tabs', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
// Ignore SSL errors
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}`, { waitUntil: 'networkidle' })
|
|
})
|
|
|
|
test('Overview page loads without error', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}`, { waitUntil: 'networkidle' })
|
|
// Should not have "Application error"
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
// Should show project name
|
|
await expect(page.locator('text=Kniehebelpresse')).toBeVisible({ timeout: 10000 })
|
|
})
|
|
|
|
test('Components tab loads', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}/components`, { waitUntil: 'networkidle' })
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
})
|
|
|
|
test('Classification tab loads', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}/classification`, { waitUntil: 'networkidle' })
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
})
|
|
|
|
test('Hazards tab loads', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}/hazards`, { waitUntil: 'networkidle' })
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
})
|
|
|
|
test('Mitigations tab loads', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}/mitigations`, { waitUntil: 'networkidle' })
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
})
|
|
|
|
test('Verification tab loads', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}/verification`, { waitUntil: 'networkidle' })
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
})
|
|
|
|
test('Evidence tab loads', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}/evidence`, { waitUntil: 'networkidle' })
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
})
|
|
|
|
test('Tech-File tab loads', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}/tech-file`, { waitUntil: 'networkidle' })
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
})
|
|
|
|
test('Monitoring tab loads', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}/monitoring`, { waitUntil: 'networkidle' })
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
})
|
|
|
|
test('Interview page loads with 3 modes', async ({ page }) => {
|
|
await page.goto(`${BASE}/sdk/iace/${PROJECT_ID}/interview`, { waitUntil: 'networkidle' })
|
|
const body = await page.textContent('body')
|
|
expect(body).not.toContain('Application error')
|
|
// Check 3 mode buttons exist
|
|
await expect(page.locator('text=Interview')).toBeVisible()
|
|
await expect(page.locator('text=Wizard')).toBeVisible()
|
|
await expect(page.locator('text=Formular')).toBeVisible()
|
|
})
|
|
})
|