Stripe: Testrabatt-Namen, Produktbild, Hosting-Leistungen, Tests für Bestandskunden
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c4607e9c43
commit
7df0b72019
7 files changed
+297
-52
No files matched your search
+47
-7
@@ -102,10 +102,17 @@ test('priceIdsOfInvoice: eindeutige Preis-IDs, ohne Lücken', () => {
|
||||
assert.deepEqual(priceIdsOfInvoice(inv), ['price_w'])
|
||||
})
|
||||
|
||||
// Fix round 1 / B9: feste Form statt Einzelfelder
|
||||
test('Vertragsunterlagen je Version', () => {
|
||||
assert.equal(termsDocFor('2026-10-05-v4').pdfFile, 'WEBklar-Abo-Vertragsunterlagen.pdf')
|
||||
assert.equal(termsDocFor('2026-09-25-v3').url, '/vertragsunterlagen/v3/abo-bedingungen.html')
|
||||
assert.equal(termsDocFor(null).url, '/vertragsunterlagen/v3/abo-bedingungen.html')
|
||||
assert.deepEqual(termsDocFor('2026-10-05-v4'), { url: '/abo-bedingungen.html', pdfFile: 'WEBklar-Abo-Vertragsunterlagen.pdf' })
|
||||
assert.deepEqual(termsDocFor('2026-09-25-v3'), {
|
||||
url: '/vertragsunterlagen/v3/abo-bedingungen.html',
|
||||
pdfFile: 'WEBklar-Wartungs-Abo-Vertragsunterlagen.pdf',
|
||||
})
|
||||
assert.deepEqual(termsDocFor(null), {
|
||||
url: '/vertragsunterlagen/v3/abo-bedingungen.html',
|
||||
pdfFile: 'WEBklar-Wartungs-Abo-Vertragsunterlagen.pdf',
|
||||
})
|
||||
})
|
||||
|
||||
test('Produktansicht enthält Leistungen ohne 1-Postfach-Regel bei Wartung', () => {
|
||||
@@ -114,10 +121,43 @@ test('Produktansicht enthält Leistungen ohne 1-Postfach-Regel bei Wartung', ()
|
||||
assert.ok(productView('hosting').features.flat().join(' ').includes('1 E-Mail-Postfach'))
|
||||
})
|
||||
|
||||
// Fix round 1, Important 3: Hosting darf keine Website-Pflege suggerieren (row 1 war von Wartung
|
||||
// kopiert) und muss "in 15-Minuten-Schritten" nennen.
|
||||
test('Produktansicht Hosting: Betriebssystem/Server-Software statt Website-Pflege', () => {
|
||||
const h = productView('hosting').features.flat().join(' ')
|
||||
assert.ok(h.includes('Betriebssystem und Server-Software'))
|
||||
assert.ok(!h.includes('Updates, Sicherheit'))
|
||||
assert.ok(h.includes('15-Minuten-Schritten'))
|
||||
})
|
||||
|
||||
// Fix round 1, B9: volle Form statt Einzelfelder, Kopie statt Referenz auf den Katalog (B10)
|
||||
test('productView: vollständige Form, Kopie der features', () => {
|
||||
const v = productView('hosting')
|
||||
assert.deepEqual(Object.keys(v).sort(), ['amountCents', 'features', 'key', 'minTermMonths', 'minutesPerMonth', 'name'].sort())
|
||||
assert.equal(v.key, 'hosting')
|
||||
assert.equal(v.name, 'WEBklar Hosting-Abo')
|
||||
assert.equal(v.amountCents, 1500)
|
||||
assert.equal(v.minTermMonths, 12)
|
||||
assert.equal(v.minutesPerMonth, 0)
|
||||
assert.ok(Array.isArray(v.features) && v.features.length > 0)
|
||||
v.features.push(['x', 'y'])
|
||||
assert.notEqual(productView('hosting').features.length, v.features.length)
|
||||
})
|
||||
|
||||
// F07: die Wartungs-Beschreibung darf die alte 1-Postfach-Regel nicht mehr enthalten (Version 4:
|
||||
// beliebig viele Postfächer, zusammen 5 GB). Der Stripe-Produkttext selbst wird erst beim
|
||||
// Livegang ueber scripts/stripe-products.mjs gesetzt.
|
||||
// beliebig viele E-Mail-Postfächer, zusammen 5 GB). Der Stripe-Produkttext selbst wird erst beim
|
||||
// Livegang ueber scripts/stripe-products.mjs gesetzt. B9: auch das § 19-Satzende pruefen.
|
||||
test('Wartung-Beschreibung ohne 1-Postfach-Regel (F07)', () => {
|
||||
assert.ok(!getProduct('wartung').description.includes('1 E-Mail-Postfach'))
|
||||
assert.ok(getProduct('wartung').description.includes('beliebig viele Postfächer'))
|
||||
const d = getProduct('wartung').description
|
||||
assert.ok(!d.includes('1 E-Mail-Postfach'))
|
||||
assert.ok(d.includes('beliebig viele E-Mail-Postfächer'))
|
||||
assert.ok(d.endsWith('Gemäß § 19 UStG ohne Umsatzsteuer.'))
|
||||
})
|
||||
|
||||
// Fix round 1, item 11: Domain-Zeile nennt die Endungen wie spec 3.1 / v4 § 3 Abs. 3
|
||||
test('Produktansicht: Domain-Zeile nennt die Endungen', () => {
|
||||
for (const key of ['wartung', 'hosting']) {
|
||||
const flat = productView(key).features.flat().join(' ')
|
||||
assert.ok(flat.includes('.de') && flat.includes('.com') && flat.includes('.eu') && flat.includes('.net') && flat.includes('.org'))
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user