fix: Profil-State nach Backend-Load in SDK-Context sync + alle Tests fixen
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Failing after 36s
CI / test-python-backend-compliance (push) Successful in 34s
CI / test-python-document-crawler (push) Successful in 26s
CI / test-python-dsms-gateway (push) Successful in 20s

- Company Profile: setCompanyProfile() und COMPLETE_STEP dispatch nach Backend-Load,
  damit Sidebar-Checkmarks nach Refresh erhalten bleiben
- compliance-scope-engine.test.ts: Property-Namen anpassen (composite_score, risk_score, etc.)
- dsfa/types.test.ts: 9 Sections (0-8), 7 required, 2 optional
- api-client.test.ts: SDKApiClient-Klasse statt nicht-existierendem Singleton
- types.test.ts: use-case-assessment statt use-case-workshop
- vitest.config.ts: E2E-Verzeichnis aus Vitest excluden

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-10 22:58:36 +01:00
parent b1a0dd3615
commit 237c05a94c
6 changed files with 79 additions and 75 deletions

View File

@@ -14,13 +14,13 @@ import {
} from '../types'
describe('DSFA_SECTIONS', () => {
it('should have 5 sections defined', () => {
expect(DSFA_SECTIONS.length).toBe(5)
it('should have 9 sections defined', () => {
expect(DSFA_SECTIONS.length).toBe(9)
})
it('should have sections numbered 1-5', () => {
it('should have sections numbered 0-8', () => {
const numbers = DSFA_SECTIONS.map(s => s.number)
expect(numbers).toEqual([1, 2, 3, 4, 5])
expect(numbers).toEqual([0, 1, 2, 3, 4, 5, 6, 7, 8])
})
it('should have GDPR references for all sections', () => {
@@ -30,15 +30,16 @@ describe('DSFA_SECTIONS', () => {
})
})
it('should mark first 4 sections as required', () => {
it('should mark 7 sections as required', () => {
const requiredSections = DSFA_SECTIONS.filter(s => s.required)
expect(requiredSections.length).toBe(4)
expect(requiredSections.map(s => s.number)).toEqual([1, 2, 3, 4])
expect(requiredSections.length).toBe(7)
expect(requiredSections.map(s => s.number)).toEqual([0, 1, 2, 3, 4, 6, 7])
})
it('should mark section 5 as optional', () => {
const section5 = DSFA_SECTIONS.find(s => s.number === 5)
expect(section5?.required).toBe(false)
it('should mark sections 5 and 8 as optional', () => {
const optionalSections = DSFA_SECTIONS.filter(s => !s.required)
expect(optionalSections.length).toBe(2)
expect(optionalSections.map(s => s.number)).toEqual([5, 8])
})
it('should have German titles for all sections', () => {
@@ -197,7 +198,7 @@ describe('DSFAMitigation type', () => {
})
describe('DSFASectionProgress type', () => {
it('should track completion for all 5 sections', () => {
it('should track completion for all 9 sections', () => {
const progress: DSFASectionProgress = {
section_0_complete: false,
section_1_complete: true,
@@ -207,6 +208,7 @@ describe('DSFASectionProgress type', () => {
section_5_complete: false,
section_6_complete: false,
section_7_complete: false,
section_8_complete: false,
}
expect(progress.section_1_complete).toBe(true)
@@ -238,11 +240,15 @@ describe('DSFA type', () => {
authority_consulted: false,
status: 'draft',
section_progress: {
section_0_complete: false,
section_1_complete: true,
section_2_complete: true,
section_3_complete: false,
section_4_complete: false,
section_5_complete: false,
section_6_complete: false,
section_7_complete: false,
section_8_complete: false,
},
conclusion: '',
created_at: new Date().toISOString(),