Files
e-tib.com/tests/homepage-and-competence-content.test.ts
Marc Mintel 792d91f9d5
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 43s
Build & Deploy / 🧪 QA (push) Successful in 1m31s
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
content: rename Kabelleitungstiefbau to Kabelleitungsnetzbau
Applied globally across MDX content, translations, and UI components including English analog terms (Cable Trenching -> Cable Network Construction).
2026-06-19 19:00:33 +02:00

87 lines
4.8 KiB
TypeScript

import { describe, it, expect } from 'vitest';
import fs from 'fs';
import path from 'path';
describe('Task 6 Content Updates', () => {
const deHomePath = path.join(process.cwd(), 'content', 'de', 'home.mdx');
const enHomePath = path.join(process.cwd(), 'content', 'en', 'home.mdx');
const deKompetenzenPath = path.join(process.cwd(), 'content', 'de', 'kompetenzen.mdx');
const enKompetenzenPath = path.join(process.cwd(), 'content', 'en', 'kompetenzen.mdx');
const deKabelnetzbauPath = path.join(process.cwd(), 'content', 'de', 'kabeltiefbau.mdx');
const enKabelnetzbauPath = path.join(process.cwd(), 'content', 'en', 'kabeltiefbau.mdx');
const deUeberUnsPath = path.join(process.cwd(), 'content', 'de', 'ueber-uns.mdx');
const enUeberUnsPath = path.join(process.cwd(), 'content', 'en', 'ueber-uns.mdx');
it('should verify Kabelleitungsnetzbau changes in DE and EN kompetenzen.mdx', () => {
const deContent = fs.readFileSync(deKompetenzenPath, 'utf8');
const enContent = fs.readFileSync(enKompetenzenPath, 'utf8');
// DE Kompetenzen
expect(deContent).toContain('title: "Kabelleitungsnetzbau"');
expect(deContent).toContain('description: "Klassischer Grabenbau, professionelle Verlegung und Kabelmontage (Hoch-, Mittel- und Niederspannung) bis 110 kV."');
expect(deContent).toContain('title: "Kabelleitungsnetzbau (Hoch-/Mittel- und Niederspannung)"');
expect(deContent).toContain('"Kabelmontagen bis 110 kV"');
expect(deContent).toContain('"name": "Kabelleitungsnetzbau"');
expect(deContent).toContain('"description": "Klassischer Grabenbau, professionelle Verlegung und Kabelmontage (Hoch-, Mittel- und Niederspannung) bis 110 kV."');
// EN Competencies
expect(enContent).toContain('title: "Cable Civil Engineering"');
expect(enContent).toContain('description: "Classic trench construction, professional laying and cable assembly (high, medium, and low voltage) up to 110 kV."');
expect(enContent).toContain('title: "Cable Civil Engineering (High/Medium/Low Voltage)"');
expect(enContent).toContain('"Cable assembly up to 110 kV"');
expect(enContent).toContain('"name": "Cable Civil Engineering"');
expect(enContent).toContain('"description": "Classic trench construction, professional laying and cable assembly (high, medium, and low voltage) up to 110 kV."');
});
it('should verify Kabelleitungsnetzbau changes in DE and EN home.mdx', () => {
const deContent = fs.readFileSync(deHomePath, 'utf8');
const enContent = fs.readFileSync(enHomePath, 'utf8');
// DE Home
expect(deContent).toContain('title: "Kabelleitungsnetzbau"');
expect(deContent).toContain('description: "Kabelleitungsnetzbau (Hoch-/Mittel- und Niederspannung) sowie Kabelmontagen bis 110 kV"');
expect(deContent).toContain('100+');
expect(deContent).toContain('Mitarbeitende');
// EN Home
expect(enContent).toContain('title: "Cable Civil Engineering"');
expect(enContent).toContain('description: "Cable civil engineering (high, medium, low voltage) and cable assembly up to 110 kV"');
expect(enContent).toContain('100+');
expect(enContent).toContain('Employees');
});
it('should verify Kabelleitungsnetzbau changes in DE and EN kabeltiefbau.mdx', () => {
const deContent = fs.readFileSync(deKabelnetzbauPath, 'utf8');
const enContent = fs.readFileSync(enKabelnetzbauPath, 'utf8');
// DE Kabelnetzbau
expect(deContent).toContain('title: "Kabelleitungsnetzbau"');
expect(deContent).toContain('excerpt: "Professioneller Kabelleitungsnetzbau');
expect(deContent).toContain('Kabelmontagen bis 110 kV');
expect(deContent).toContain('subtitle="Komplette Infrastruktur-Lösungen für Hoch-, Mittel- und Niederspannungsnetze sowie Kabelmontagen bis 110 kV"');
expect(deContent).toContain('"Kabelmontagen bis 110 kV"');
// EN Kabelnetzbau
expect(enContent).toContain('title: "Cable Civil Engineering"');
expect(enContent).toContain('excerpt: "Professional cable civil engineering');
expect(enContent).toContain('cable assembly up to 110 kV');
expect(enContent).toContain('subtitle="Complete infrastructure solutions for high, medium, and low voltage networks and cable assembly up to 110 kV"');
expect(enContent).toContain('"Cable assembly up to 110 kV"');
});
it('should verify employee and project counts in DE and EN ueber-uns.mdx', () => {
const deContent = fs.readFileSync(deUeberUnsPath, 'utf8');
const enContent = fs.readFileSync(enUeberUnsPath, 'utf8');
// DE Ueber uns
expect(deContent).toContain('100+');
expect(deContent).toContain('Mitarbeitende');
expect(deContent).toContain('Seit 2016 haben wir in über 200 Projekten quer');
// EN Ueber uns
expect(enContent).toContain('100+');
expect(enContent).toContain('Employees');
expect(enContent).toContain('Since 2016, we have proven in over 200 projects across');
});
});