/** * SDK Module Reachability Test * * Prueft dass alle SDK-Module erreichbar sind (kein 404, kein Crash). * Schnellster Test — findet kaputte Seiten sofort. */ import { test, expect } from '@playwright/test' const BASE = process.env.PLAYWRIGHT_BASE_URL || 'https://macmini:3007' // All SDK module routes to test const SDK_ROUTES = [ // Phase 1: Vorbereitung '/sdk/company-profile', '/sdk/compliance-scope', '/sdk/advisory-board', '/sdk/screening', '/sdk/source-policy', // Phase 2: Analyse '/sdk/requirements', '/sdk/controls', '/sdk/evidence', '/sdk/risks', '/sdk/ai-act', '/sdk/audit-checklist', '/sdk/audit-report', // Phase 3: Dokumentation '/sdk/obligations', '/sdk/dsfa', '/sdk/tom', '/sdk/loeschfristen', '/sdk/vvt', // Phase 4: Rechtliche Texte '/sdk/einwilligungen', '/sdk/consent', '/sdk/cookie-banner', '/sdk/document-generator', '/sdk/workflow', // Phase 5: Betrieb '/sdk/dsr', '/sdk/escalations', '/sdk/vendor-compliance', '/sdk/vendor-compliance/transfers', '/sdk/consent-management', '/sdk/email-templates', '/sdk/notfallplan', '/sdk/incidents', '/sdk/whistleblower', '/sdk/academy', '/sdk/training', '/sdk/control-library', // Zusatzmodule '/sdk/isms', '/sdk/iace', '/sdk/agent', '/sdk/rag', '/sdk/quality', '/sdk/security-backlog', '/sdk/reporting', '/sdk/tom-generator', ] test.describe('SDK Module Reachability', () => { for (const route of SDK_ROUTES) { test(`${route} is reachable`, async ({ page }) => { const response = await page.goto(`${BASE}${route}`, { waitUntil: 'domcontentloaded', timeout: 15000, }) // Page should load successfully (not 404 or 500) expect(response?.status()).toBeLessThan(400) // No error text in the page const bodyText = await page.textContent('body') expect(bodyText).not.toContain('404') expect(bodyText).not.toContain('Application error') expect(bodyText).not.toContain('Internal Server Error') // Page should have some content (not blank) const contentLength = bodyText?.length || 0 expect(contentLength).toBeGreaterThan(100) }) } })