Webshop A3: Register-Eintrag shop, Haken, Rechtstext-Satz und Ticket-Details

Registereintrag config.features.shop (Bestelltexte mit Fassung config.shop.fassung, Rechtsunterlagen-Getter,
Mailtexte, Ticket), STANDARD_HAKEN.shop (Schalter, Bestellpruefung ueber shop/anfrage.js, Unterlagen, Belehrung),
legalDocs-Satz shop, shopTicketDetails sowie Rumpf von anfrageOffenePunkte. Tests angepasst und um Shop-Faelle erweitert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-05 08:35:28 +00:00
1 parent 6782d99960
commit 0e74f1669c
12 files changed
+594 -23

No files matched your search

+18 -3
View File
@@ -69,13 +69,14 @@ test('liste_zustaende', async () => {
assert.deepEqual(body.termine, { verfuegbar: false })
// Register-Ansicht (B12): Preise und Bestelltexte beider Funktionen aus config.features, auch bei termine.verfuegbar: false
assert.deepEqual(Object.keys(body.features).sort(), ['news', 'termine'])
assert.deepEqual(Object.keys(body.features).sort(), ['news', 'shop', 'termine'])
assert.equal(body.features.shop.priceLabel, '299 €')
assert.equal(body.features.news.priceLabel, '30 €')
assert.equal(body.features.termine.priceLabel, '149 €')
assert.equal(body.ustHinweis, config.ustHinweis)
assert.ok(typeof body.ustHinweis === 'string' && body.ustHinweis.length > 0)
// Items vollstaendig: Kennung, Wortlaut und Haken jedes Registerpunkts, dazu Fassung und Knopf
for (const key of ['news', 'termine']) {
for (const key of ['news', 'termine', 'shop']) {
const eintrag = config.features[key]
const ansicht = body.features[key]
assert.equal(ansicht.key, key)
@@ -111,7 +112,7 @@ test('liste_legal: legal.termine mit Fassung, https-Links mit Fassung und der Be
const { legalPaths } = await import('../server/services/legalDocs.js')
const V = config.termine.avvVersion
const body = await get('/api/funktionen', { cookie })
assert.deepEqual(Object.keys(body.legal).sort(), ['news', 'termine'])
assert.deepEqual(Object.keys(body.legal).sort(), ['news', 'shop', 'termine'])
assert.equal(body.legal.news, null)
const termine = body.legal.termine
assert.deepEqual(Object.keys(termine).sort(), ['belehrung', 'links', 'version'])
@@ -130,6 +131,20 @@ test('liste_legal: legal.termine mit Fassung, https-Links mit Fassung und der Be
assert.deepEqual(body.features.termine.avv, { version: V, url: adressen.avv })
assert.deepEqual(body.features.termine.leistungsbeschreibung, { version: V, url: adressen.lb })
assert.deepEqual(body.features.news.widerruf, null)
// Webshop: eigene Fassung (config.shop.fassung), eigene Slugs, dieselbe Belehrung der Funktionen
const S = config.shop.fassung
const shop = body.legal.shop
assert.deepEqual(Object.keys(shop).sort(), ['belehrung', 'links', 'version'])
assert.equal(shop.version, S)
assert.deepEqual(Object.keys(shop.links), ['lb', 'avv', 'widerruf'])
const shopAdressen = legalPaths('shop', S)
for (const [doc, link] of Object.entries(shop.links)) assert.equal(link, `${config.publicBaseUrl}${shopAdressen[doc]}`)
assert.ok(shop.links.lb.includes('leistungsbeschreibung-webshop-'))
assert.ok(shop.links.avv.includes('avv-webshop-'))
assert.ok(shop.links.widerruf.includes('widerrufsbelehrung-funktionen-'))
assert.equal(shop.belehrung, widerrufsbelehrungFunktion())
assert.deepEqual(body.features.shop.avv, { version: S, url: shopAdressen.avv })
})
test('liste_register_ohne_freigabe: features.termine steht auch bei Schalter off und Pilot ohne Teilnahme', async () => {