This repository has been archived on 2026-02-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BreakPilot Dev 19855efacc
Some checks failed
Tests / Go Tests (push) Has been cancelled
Tests / Python Tests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / Go Lint (push) Has been cancelled
Tests / Python Lint (push) Has been cancelled
Tests / Security Scan (push) Has been cancelled
Tests / All Checks Passed (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Go Security Scan (push) Has been cancelled
Security Scanning / Python Security Scan (push) Has been cancelled
Security Scanning / Node.js Security Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
CI/CD Pipeline / Go Tests (push) Has been cancelled
CI/CD Pipeline / Python Tests (push) Has been cancelled
CI/CD Pipeline / Website Tests (push) Has been cancelled
CI/CD Pipeline / Linting (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build & Push (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / CI Summary (push) Has been cancelled
ci/woodpecker/manual/build-ci-image Pipeline was successful
ci/woodpecker/manual/main Pipeline failed
feat: BreakPilot PWA - Full codebase (clean push without large binaries)
All services: admin-v2, studio-v2, website, ai-compliance-sdk,
consent-service, klausur-service, voice-service, and infrastructure.
Large PDFs and compiled binaries excluded via .gitignore.
2026-02-11 13:25:58 +01:00

128 lines
3.6 KiB
TypeScript

import { describe, it, expect } from 'vitest'
import { STEP_EXPLANATIONS } from '../StepHeader'
// Focus on testing the STEP_EXPLANATIONS data structure
// Component tests require more complex SDK context mocking
describe('STEP_EXPLANATIONS', () => {
it('should have explanations for all Phase 1 steps', () => {
const phase1Steps = [
'use-case-workshop',
'screening',
'modules',
'requirements',
'controls',
'evidence',
'audit-checklist',
'risks',
]
phase1Steps.forEach(stepId => {
expect(STEP_EXPLANATIONS[stepId]).toBeDefined()
expect(STEP_EXPLANATIONS[stepId].title).toBeDefined()
expect(STEP_EXPLANATIONS[stepId].title.length).toBeGreaterThan(0)
expect(STEP_EXPLANATIONS[stepId].description).toBeDefined()
expect(STEP_EXPLANATIONS[stepId].description.length).toBeGreaterThan(0)
expect(STEP_EXPLANATIONS[stepId].explanation).toBeDefined()
expect(STEP_EXPLANATIONS[stepId].explanation.length).toBeGreaterThan(0)
})
})
it('should have explanations for all Phase 2 steps', () => {
const phase2Steps = [
'ai-act',
'obligations',
'dsfa',
'tom',
'loeschfristen',
'vvt',
'consent',
'cookie-banner',
'einwilligungen',
'dsr',
'escalations',
]
phase2Steps.forEach(stepId => {
expect(STEP_EXPLANATIONS[stepId]).toBeDefined()
expect(STEP_EXPLANATIONS[stepId].title).toBeDefined()
expect(STEP_EXPLANATIONS[stepId].description).toBeDefined()
})
})
it('should have tips array for each step explanation', () => {
Object.entries(STEP_EXPLANATIONS).forEach(([stepId, explanation]) => {
expect(explanation.tips).toBeDefined()
expect(Array.isArray(explanation.tips)).toBe(true)
expect(explanation.tips.length).toBeGreaterThan(0)
})
})
it('should have valid tip icons', () => {
const validIcons = ['info', 'warning', 'success', 'lightbulb']
Object.entries(STEP_EXPLANATIONS).forEach(([stepId, explanation]) => {
explanation.tips.forEach((tip, tipIndex) => {
expect(validIcons).toContain(tip.icon)
expect(tip.title).toBeDefined()
expect(tip.title.length).toBeGreaterThan(0)
expect(tip.description).toBeDefined()
expect(tip.description.length).toBeGreaterThan(0)
})
})
})
it('should have a use-case-workshop explanation', () => {
const ucWorkshop = STEP_EXPLANATIONS['use-case-workshop']
expect(ucWorkshop.title).toContain('Use Case')
expect(ucWorkshop.tips.length).toBeGreaterThanOrEqual(2)
})
it('should have a risks explanation', () => {
const risks = STEP_EXPLANATIONS['risks']
expect(risks.title).toBeDefined()
expect(risks.explanation).toContain('Risiko')
})
it('should have a dsfa explanation', () => {
const dsfa = STEP_EXPLANATIONS['dsfa']
expect(dsfa.title).toContain('Datenschutz')
expect(dsfa.explanation.length).toBeGreaterThan(50)
})
it('should cover all 19 SDK steps', () => {
const allStepIds = [
// Phase 1
'use-case-workshop',
'screening',
'modules',
'requirements',
'controls',
'evidence',
'audit-checklist',
'risks',
// Phase 2
'ai-act',
'obligations',
'dsfa',
'tom',
'loeschfristen',
'vvt',
'consent',
'cookie-banner',
'einwilligungen',
'dsr',
'escalations',
]
expect(Object.keys(STEP_EXPLANATIONS).length).toBe(allStepIds.length)
allStepIds.forEach(stepId => {
expect(STEP_EXPLANATIONS[stepId]).toBeDefined()
})
})
})