Mails: Produktname statt fest Wartungs-Abo, neue Mails für Wechsel und Zusatzspeicher, UptimeRobot-Hinweis
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
0d2254ca20
commit
19f9c747a2
24 files changed
+407
-100
No files matched your search
@@ -301,6 +301,32 @@ test('Wechsel: Stripe-Aufruf mit Anker jetzt, Metadaten, Ereignis', async () =>
|
||||
assert.deepEqual(logs.warn.filter((w) => /Vorlage (K12|T12)/.test(w)), [])
|
||||
})
|
||||
|
||||
// Task 12 (Spec 3.5): {{monatspreis}} in K12 und T12 ist die Monatsgebühr des Wartungs-Abos mit gebuchtem
|
||||
// Zusatzspeicher; K12 sagt es im Block zusatzspeicher. Auch nach einem gescheiterten Wechsel (T12 aus dem Ereignis)
|
||||
test('K12/T12: Monatspreis mit gebuchtem Zusatzspeicher, auch im Hinweis zum gescheiterten Wechsel', async () => {
|
||||
await resetHosting({ stripe: { storageUnits: 2 } })
|
||||
st.nextSubscriptionUpdate = { pending_update: pendingUpdate(), latest_invoice: switchInvoice({ id: 'in_speicher', status: 'open', amount_due: 4300, hosted_invoice_url: 'https://pay.example/inv2' }) }
|
||||
await switchToWartung('c1', consent, nowUnix())
|
||||
const [k12] = mailsWithSubject(K12_SUBJECT)
|
||||
assert.ok(k12.text.includes('52,00 € / Monat'), k12.text)
|
||||
assert.ok(k12.text.includes('einschließlich Ihres gebuchten E-Mail-Zusatzspeichers'), k12.text)
|
||||
assert.ok(k12.text.includes('43,00 €'))
|
||||
assert.deepEqual(mailsWithSubject(t12Subject('k@example.invalid')), [])
|
||||
const [ev] = await listContractEvents('c1')
|
||||
assert.equal(ev.details.monthlyCents, 5200)
|
||||
await markSwitchFailed(ev.$id, SWITCH_FAILED_REASONS.abgelaufen)
|
||||
const [t12] = mailsWithSubject(t12Subject('k@example.invalid'))
|
||||
assert.ok(t12.text.includes('52,00 €'), t12.text)
|
||||
assert.ok(t12.text.includes('43,00 €'))
|
||||
// Ohne Zusatzspeicher: 50,00 € und kein Block
|
||||
await resetHosting()
|
||||
st.nextSubscriptionUpdate = { latest_invoice: switchInvoice() }
|
||||
await switchToWartung('c1', consent, nowUnix())
|
||||
const [plain] = mailsWithSubject(K12_SUBJECT)
|
||||
assert.ok(plain.text.includes('50,00 € / Monat'), plain.text)
|
||||
assert.ok(!plain.text.includes('einschließlich Ihres gebuchten'))
|
||||
})
|
||||
|
||||
test('Offene Rechnung liefert paymentUrl', async () => {
|
||||
await resetHosting({ id: 'sub_h2', customerId: 'c2', mirror: hosting2Doc })
|
||||
// Karte, Zahlung nicht sofort erfolgreich (3-D Secure): Stripe haelt die Aenderung in pending_update zurueck
|
||||
|
||||
Reference in new issue
Block a user