Files
e-tib.com/tests/certificates.test.ts
T
mmintelandClaude Haiku 5.5 fb19425ddf
Build & Deploy / 🔔 Notify (push) Successful in 2s
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Successful in 1m21s
Build & Deploy / 🏗️ Build (push) Successful in 2m21s
Build & Deploy / 🚀 Deploy (push) Successful in 37s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 58s
fix(certificates): replace ISO 9001 and 14001 certificates with 2026 renewal
The renewed certificates from Zertifizierung Bau GmbH (issued 30.11.2026)
are valid from 06.12.2026 to 05.12.2029. Replace both PDFs and update the
validity dates in the DE component and the EN content. The test now checks
the new period for both certificates.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-12-01 09:56:39 +01:00

39 lines
1.7 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { describe, it, expect } from 'vitest';
import fs from 'fs';
import { defaultCertificates } from '../components/blocks/CertificatesBlock';
import path from 'path';
describe('Certificates & Insurance Integration (DE + EN)', () => {
it('includes the new RheinLand Betriebshaftpflichtversicherung in defaultCertificates (DE)', () => {
const haftpflichtCert = defaultCertificates.find(
(cert) => cert.title === 'Betriebshaftpflichtversicherung'
);
expect(haftpflichtCert).toBeDefined();
expect(haftpflichtCert?.pdfUrl).toBe('/assets/certificates/betriebshaftpflicht.pdf');
expect(haftpflichtCert?.date).toBe('25.03.2026');
});
it('verifies that content/en/zertifikate.mdx includes Commercial Liability Insurance (EN)', () => {
const enMdx = fs.readFileSync(path.join(__dirname, '../content/en/zertifikate.mdx'), 'utf-8');
expect(enMdx).toContain("title: 'Commercial Liability Insurance'");
expect(enMdx).toContain("pdfUrl: '/assets/certificates/betriebshaftpflicht.pdf'");
expect(enMdx).toContain("date: '25.03.2026'");
});
it('lists the renewed ISO 9001 and ISO 14001 certificates with their validity period (DE)', () => {
const isoCerts = defaultCertificates.filter((cert) =>
['ISO 9001:2015', 'ISO 14001:2015'].includes(cert.title)
);
expect(isoCerts).toHaveLength(2);
for (const cert of isoCerts) {
expect(cert.date).toBe('06.12.2026 – 05.12.2029');
}
});
it('verifies that the PDF asset exists in public/assets/certificates/betriebshaftpflicht.pdf', () => {
const filePath = path.join(__dirname, '../public/assets/certificates/betriebshaftpflicht.pdf');
expect(fs.existsSync(filePath)).toBe(true);
});
});