Webshop A1/A2: Konfiguration, Schalter, Katalog shopSetup, Schema und Setup-Skript
config.shop (SHOP_ENABLED, SHOP_PILOT_EMAILS, SHOP_UPLOAD_DIR, STRIPE_CONNECT_WEBHOOK_SECRET), config.shopSetup (299 € einmalig), Collection-IDs shopConfig/shopProducts/shopOrders/shopWiderrufe, services/shop/schalter.js, Katalogschluessel shopSetup in stripeBilling und stripe-products.mjs, services/shop/schema.js, scripts/shop-setup.mjs (--check), schemaKeys fuer die Test-Mocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b168b10485
commit
e9ab15bdb5
11 files changed
+759
-6
No files matched your search
@@ -31,18 +31,30 @@ test('Import startet main() nicht: kein Stripe-Aufruf, kein process.exit', () =>
|
||||
assert.equal(st.calls.length, 0)
|
||||
})
|
||||
|
||||
test('KEYS enthaelt den Terminplaner-Katalogschluessel', () => {
|
||||
assert.deepEqual(script.KEYS, ['wartung', 'hosting', 'mailStorage', 'newsSetup', 'termineSetup'])
|
||||
test('KEYS enthaelt die Katalogschluessel der Einrichtungen', () => {
|
||||
assert.deepEqual(script.KEYS, ['wartung', 'hosting', 'mailStorage', 'newsSetup', 'termineSetup', 'shopSetup'])
|
||||
})
|
||||
|
||||
test('catalogEntry liefert die Katalogeintraege aus der Konfiguration', () => {
|
||||
assert.equal(script.catalogEntry('termineSetup'), config.termineSetup)
|
||||
assert.equal(script.catalogEntry('shopSetup'), config.shopSetup)
|
||||
assert.equal(script.catalogEntry('newsSetup'), config.newsSetup)
|
||||
assert.equal(script.catalogEntry('mailStorage'), config.mailStorage)
|
||||
assert.equal(script.catalogEntry('wartung'), config.products.wartung)
|
||||
for (const key of script.KEYS) assert.ok(script.catalogEntry(key)?.lookupKey, `${key} hat einen lookupKey`)
|
||||
})
|
||||
|
||||
test('config.shopSetup: Festwerte', () => {
|
||||
assert.deepEqual(config.shopSetup, {
|
||||
key: 'shopSetup',
|
||||
name: 'Webshop – Einrichtung',
|
||||
amountCents: 29900,
|
||||
lookupKey: 'webklar_shop_einrichtung_29900',
|
||||
oneTime: true,
|
||||
priceNickname: 'Webshop-Einrichtung 299 €',
|
||||
})
|
||||
})
|
||||
|
||||
test('config.termineSetup: Festwerte', () => {
|
||||
assert.deepEqual(config.termineSetup, {
|
||||
key: 'termineSetup',
|
||||
|
||||
Reference in new issue
Block a user