Files
breakpilot-compliance/admin-compliance/e2e/specs/sdk-module-reachability.spec.ts
T
Benjamin Admin d3b43250b8 test: Playwright E2E tests for SDK modules (5 specs)
New E2E test specs:
- sdk-module-reachability: Tests 40+ SDK routes for 404/crash
- scope-profiling: Three customer profiles (Startup/KMU/Enterprise)
  with screenshots at each step — data NOT cleaned up
- document-generator: Template library, categories, recommendations
- vendor-transfers: Transfer tab, explanations, adequacy list
- isms-assets: Asset register tab, form, CRUD

All tests configured to run against https://macmini:3007
Screenshots saved to e2e/test-results/ for manual review

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-01 19:13:52 +02:00

92 lines
2.2 KiB
TypeScript

/**
* 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)
})
}
})