Shop J1: Leistungsbeschreibung und AVV Webshop (Fassung 2026-10-05) als Markdown, HTML, PDF und Prüfsumme, Satz/Modus shop in den Build-Skripten, Kanzlei-Fragenliste
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b8055b336c
commit
17ad5cbcdc
13 files changed
+1066
-25
No files matched your search
+18
-6
@@ -291,7 +291,7 @@ test('News: Leistungsbeschreibung folgt der Fassung <F> (Adresse unverändert, k
|
||||
assert.equal(Object.getOwnPropertyDescriptor(n, 'leistungsbeschreibung').get, undefined)
|
||||
})
|
||||
|
||||
// Webshop (Block A3): eigener Satz mit eigener Fassung config.shop.fassung; die Dateien legt Block J an
|
||||
// Webshop (Block A3): eigener Satz mit eigener Fassung config.shop.fassung; die Dateien hat Block J1 angelegt
|
||||
test('Webshop-Satz: Adressen, PDF-Namen und Funktionszuordnung folgen config.shop.fassung', async () => {
|
||||
const S = config.shop.fassung
|
||||
assert.match(S, /^\d{4}-\d{2}-\d{2}$/)
|
||||
@@ -323,15 +323,27 @@ test('Webshop-Satz: Adressen, PDF-Namen und Funktionszuordnung folgen config.sho
|
||||
assert.deepEqual(featureLegalPaths('termine'), legalPaths('termine', V))
|
||||
})
|
||||
|
||||
test('featureLegalReady("shop") ist true genau dann, wenn alle sechs Dateien der Fassung da sind (bis Block J: false)', async () => {
|
||||
test('featureLegalReady("shop") ist true: alle sechs Dateien der Fassung (Leistungsbeschreibung, AVV, Widerrufsbelehrung als HTML und PDF) sind da (Block J1)', async () => {
|
||||
const S = config.shop.fassung
|
||||
const html = Object.values(legalPaths('shop', S))
|
||||
const pdfs = Object.values(legalPdfFiles('shop', S)).map((x) => x.path)
|
||||
const alleDa = html.every((p) => existsSync(root(`public${p}`))) && pdfs.every((p) => existsSync(p))
|
||||
assert.equal(await featureLegalReady('shop'), alleDa)
|
||||
assert.equal(html.length, 3)
|
||||
assert.equal(pdfs.length, 3)
|
||||
for (const p of html) assert.ok(existsSync(root(`public${p}`)), `${p} fehlt`)
|
||||
for (const p of pdfs) assert.ok(existsSync(p), `${p} fehlt`)
|
||||
assert.equal(await featureLegalReady('shop'), true)
|
||||
assert.equal(await featureLegalReady('shop', { fassung: '1999-01-01' }), false)
|
||||
// nie ein Wurf bei fehlenden Dateien; die Anhaenge werfen dagegen
|
||||
if (!alleDa) await assert.rejects(featureLegalAttachments('shop'))
|
||||
// die Anhaenge der Bestellmail: Leistungsbeschreibung, AVV, Widerrufsbelehrung als echte PDFs
|
||||
const anhaenge = await featureLegalAttachments('shop')
|
||||
assert.deepEqual(anhaenge.map((a) => a.filename), [
|
||||
`Leistungsbeschreibung-Webshop-${S}.pdf`,
|
||||
`AVV-Webshop-${S}.pdf`,
|
||||
`Widerrufsbelehrung-Muster-Widerrufsformular-${S}.pdf`,
|
||||
])
|
||||
for (const a of anhaenge) {
|
||||
assert.equal(a.contentType, 'application/pdf')
|
||||
assert.equal(a.content.subarray(0, 5).toString('latin1'), '%PDF-')
|
||||
}
|
||||
})
|
||||
|
||||
test('Register: leistungsbeschreibung, avv und widerruf des Webshops folgen config.shop.fassung (Drift-Wächter)', () => {
|
||||
|
||||
Reference in new issue
Block a user