feat: add Backend mit allen aktuellen features + Demo Daten

This commit is contained in:
Robert Wartenberg committed 2026-08-28 16:35:59 +02:00
1 parent a78e84515a
commit e122aa8650
17 files changed
+704 -238

No files matched your search

@@ -22,3 +22,63 @@ test('hält die statische Vorschaukopie der Buchungsassets identisch', async ()
assert.equal(previewScript, componentScript);
assert.equal(previewStyle, componentStyle);
});
test('modelliert Bestätigung, Mailausgang und ICS-Feeds als zweite Migration', async () => {
const migration = await readFile(new URL('../database/migrations/002_booking_workflow.sql', import.meta.url), 'utf8');
assert.match(migration, /confirmation_token_hash/);
assert.match(migration, /confirmation_expires_at/);
assert.match(migration, /CREATE TABLE IF NOT EXISTS `sufw_booking_outbox`/);
assert.match(migration, /CREATE TABLE IF NOT EXISTS `sufw_booking_project_settings`/);
assert.match(migration, /UNIQUE KEY `sufw_booking_outbox_registration_kind`/);
});
test('liefert lokale Demo-Termine und bestätigte Teilnahmen vor und nach dem heutigen Datum', async () => {
const migration = await readFile(new URL('../database/migrations/003_booking_demo_data.sql', import.meta.url), 'utf8');
assert.match(migration, /Nur für lokale Entwicklungs- und Testdatenbanken/);
assert.match(migration, /DATE_ADD\(CURDATE\(\), INTERVAL -1 MONTH\)/);
assert.match(migration, /DATE_ADD\(CURDATE\(\), INTERVAL 1 MONTH\)/);
assert.match(migration, /'confirmed'/);
assert.match(migration, /sufw_booking_registrations/);
});
test('erweitert Demo-Kontakte um die vorgesehenen Ansprechpartnerdaten', async () => {
const migration = await readFile(new URL('../database/migrations/004_booking_contact_phones.sql', import.meta.url), 'utf8');
assert.match(migration, /ADD COLUMN IF NOT EXISTS `contact_phone`/);
assert.match(migration, /Carina Hollederer/);
assert.match(migration, /Sarah van den Heuvel/);
});
test('liefert die unabhängige Verwaltung unter booking-admin mit getrennten Bereichen', async () => {
const [routes, admin] = await Promise.all([
readFile(new URL('../public/.htaccess', import.meta.url), 'utf8'),
readFile(new URL('../public/booking-admin/index.php', import.meta.url), 'utf8'),
]);
assert.match(routes, /\^booking-admin\/\?\$ booking-admin\/index\.php/);
assert.match(admin, /view === 'registrations'/);
assert.match(admin, /view === 'export'/);
assert.doesNotMatch(admin, /getenv\(/);
assert.match(admin, />Teilnahmen</);
assert.match(admin, />Export</);
assert.match(admin, /data-datetime-picker/);
assert.match(admin, /data-date-picker/);
assert.doesNotMatch(admin, /datetime-local/);
assert.match(admin, /data-picker-hour/);
assert.match(admin, /data-picker-quarter/);
assert.match(admin, /Array\.from\(\{length:24\}/);
assert.match(admin, /\['00','15','30','45'\]/);
assert.match(admin, /data-picker-close/);
assert.match(admin, /<select name="title"/);
assert.match(admin, /data-dropdown-indicator/);
assert.match(admin, /SELECT DISTINCT contact_name, contact_email, contact_phone/);
assert.match(admin, /contactByName\[contactName\.value\]/);
assert.match(admin, /contactByEmail\[contactEmail\.value\]/);
assert.match(admin, /booking-datetime-change/);
assert.match(admin, /id="export-project"/);
assert.match(admin, /DATE\(e\.starts_at\) AS event_day/);
assert.match(admin, /export-project/);
assert.doesNotMatch(admin, /text\/csv|fputcsv/i);
});
+2 -2
View File
@@ -55,8 +55,8 @@ test('gibt den Absenden-Button erst nach DSGVO-Einwilligung frei', () => {
assert.equal(canSubmitBookingForm(true), true);
});
test('zeigt nach dem Absenden eine verbindliche Bestätigung ohne Mockup-Hinweis', () => {
test('zeigt nach dem Absenden den nächsten Bestätigungsschritt ohne Mockup-Hinweis', () => {
const message = bookingConfirmationMessage('Erstgespräch');
assert.match(message, /verbindlich gespeichert/);
assert.match(message, /E-Mail/);
assert.doesNotMatch(message, /Vorschau|Mockup/i);
});