1.7 KiB
1.7 KiB
F-152 — Acceptance Criteria
- Feature ID: F-152
Account creation → welcome email
- Escenario: customer registers with a new email.
- Given SMTP is configured and
POST /auth/registeris called with valid email+password - When registration succeeds
- Then a welcome email (
account_created) is sent to that email - And the response is still 200 with the user payload
- And evidence: SMTP sendmail called once with recipient == input email and template account_created
- Given SMTP is configured and
- Escenario: SMTP is not configured.
- Given SMTP is not configured and
POST /auth/registeris called - When registration succeeds
- Then the response is still 200 (registration never fails due to email)
- And a warning is logged
- Given SMTP is not configured and
Order confirmation on payment success
- Escenario: customer pays and Stripe reports PaymentSucceeded.
- Given an order in AWAITING_PAYMENT and a valid
PaymentSucceededwebhook - When the webhook is processed
- Then the order moves to PAID
- And a confirmation email (
state: PAID) is sent to the order's customer email via sendOrderStatusEmail - And the webhook returns 2xx
- Given an order in AWAITING_PAYMENT and a valid
- Escenario: duplicate webhook.
- Given the same PaymentSucceeded webhook delivered twice
- When the second is processed
- Then only one confirmation email is sent (idempotency from payment dedup / outcome.kind == duplicate skipped)
- Escenario: SMTP not configured.
- Given SMTP not configured and a PaymentSucceeded webhook arrives
- When processed
- Then the order still moves to PAID, webhook returns 2xx, and an email failure is logged (not thrown)
Regression
- verify.sh is green
- No existing order admin-transition email behavior changed
- Password-reset email flow unchanged