- Company-wide templates view: internal AI policy (framework), AI literacy training plan & record (Art. 4) listing inventory systems, works agreement on AI (Sec. 87(1) No. 6 / Sec. 90 BetrVG draft) - System-specific forms in detail view (role/risk/country gated): works council information letter (Sec. 90 BetrVG, DE module), employee information on AI use (Art. 26(7) / Law 132/2025), FRIA working template (Art. 27), serious incident report form (Art. 73 incl. 15/10/2-day deadlines) - All templates bilingual (DE/EN), letterhead-printable, placeholder- based drafts with legal disclaimer - 8 new tests (52 total) Claude-Session: https://claude.ai/code/session_017YjohVNx1ZGNM4MX7tHpfv
105 lines
3.4 KiB
TypeScript
105 lines
3.4 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { CONTENT_PACK, getContentPack } from '../content/pack';
|
|
import { classify } from './classify';
|
|
import { aiPolicy, trainingPlan, worksAgreement } from './templatesCompany';
|
|
import { employeeInfo, friaTemplate, incidentReportForm, worksCouncilInfo } from './templatesSystem';
|
|
import type { AISystem, AssessmentAnswers, CompanyProfile } from './types';
|
|
|
|
const answers: AssessmentAnswers = {
|
|
isAISystem: true,
|
|
role: 'deployer',
|
|
isGPAIModel: false,
|
|
prohibitedPractices: [],
|
|
annexIIICategories: ['a3-employment'],
|
|
art63Exception: false,
|
|
involvesProfiling: false,
|
|
isAnnexISafetyComponent: false,
|
|
transparencyTriggers: [],
|
|
};
|
|
|
|
const system: AISystem = {
|
|
id: 'sys-1',
|
|
name: 'Bewerber-Screening',
|
|
purpose: 'Vorauswahl',
|
|
vendor: 'ACME',
|
|
owner: 'Jane',
|
|
createdAt: '2026-07-01T00:00:00.000Z',
|
|
updatedAt: '2026-07-01T00:00:00.000Z',
|
|
answers,
|
|
classification: classify(answers, CONTENT_PACK),
|
|
obligationStatus: {},
|
|
};
|
|
|
|
const profile: CompanyProfile = {
|
|
name: 'Muster GmbH',
|
|
street: '',
|
|
zipCity: '',
|
|
contactPerson: '',
|
|
email: '',
|
|
phone: '',
|
|
website: '',
|
|
logoDataUrl: '',
|
|
countries: ['DE'],
|
|
};
|
|
|
|
const TODAY = '2026-07-04';
|
|
|
|
describe('systembezogene Vordrucke', () => {
|
|
it('Betriebsrats-Information nennt § 90 und § 87 BetrVG', () => {
|
|
const md = worksCouncilInfo(system, CONTENT_PACK, TODAY, profile);
|
|
expect(md).toContain('§ 90');
|
|
expect(md).toContain('§ 87 Abs. 1 Nr. 6');
|
|
expect(md).toContain('Muster GmbH');
|
|
expect(md).toContain('keine Rechtsberatung');
|
|
});
|
|
|
|
it('Mitarbeiterinformation verweist auf Art. 26 Abs. 7', () => {
|
|
const md = employeeInfo(system, CONTENT_PACK, TODAY, profile);
|
|
expect(md).toContain('Art. 26 Abs. 7');
|
|
expect(md).toContain('Bewerber-Screening');
|
|
});
|
|
|
|
it('FRIA-Vorlage enthält die Art.-27-Prüfschritte', () => {
|
|
const md = friaTemplate(system, CONTENT_PACK, TODAY, profile);
|
|
expect(md).toContain('Art. 27');
|
|
expect(md).toContain('Grundrechte');
|
|
expect(md).toContain('_[AUSFÜLLEN]_');
|
|
});
|
|
|
|
it('Vorfallmeldung nennt die Art.-73-Fristen (15/10/2 Tage)', () => {
|
|
const md = incidentReportForm(system, CONTENT_PACK, TODAY, profile);
|
|
expect(md).toContain('Art. 73');
|
|
expect(md).toContain('15 Tage');
|
|
expect(md).toContain('2 Tage');
|
|
});
|
|
|
|
it('Vordrucke sind auch auf Englisch verfügbar', () => {
|
|
const md = worksCouncilInfo(system, getContentPack('en'), TODAY, profile, 'en');
|
|
expect(md).toContain('works council');
|
|
expect(md).toContain('Sec. 90 BetrVG');
|
|
});
|
|
});
|
|
|
|
describe('unternehmensweite Vorlagen', () => {
|
|
it('KI-Richtlinie enthält Kernabschnitte', () => {
|
|
const md = aiPolicy(CONTENT_PACK, TODAY, profile);
|
|
expect(md).toContain('KI-Richtlinie');
|
|
expect(md).toContain('Verbotene Nutzungen');
|
|
expect(md).toContain('Art. 50');
|
|
});
|
|
|
|
it('Schulungsplan listet betroffene Systeme', () => {
|
|
const md = trainingPlan([system], CONTENT_PACK, TODAY, profile);
|
|
expect(md).toContain('Art. 4');
|
|
expect(md).toContain('Schulungsmatrix');
|
|
expect(md).toContain('Bewerber-Screening');
|
|
});
|
|
|
|
it('Betriebsvereinbarung enthält Paragrafen und Unterschriftszeile', () => {
|
|
const md = worksAgreement(CONTENT_PACK, TODAY, profile);
|
|
expect(md).toContain('§ 1 Geltungsbereich');
|
|
expect(md).toContain('§ 3 Keine vollautomatisierten Personalentscheidungen');
|
|
expect(md).toContain('Betriebsrat: _______________');
|
|
});
|
|
});
|