food-market/tests/e2e/scenarios/platform-smtp.yml
nns a04b4bf2dd test(e2e): scenarios platform-smtp + auth-password
platform-smtp (ТЗ 2.9, 6 шагов): причина изменения обязательна (≥10),
test-send без настроек → 400, пароль шифруется в БД (не плейнтекст) и никогда
не возвращается клиентом, сентинел __clear__ очищает пароль.

auth-password (ТЗ 2.1.3, 6 шагов): анти-энумерация (forgot всегда 200),
reset с битым токеном / коротким паролем → 400, рейт-лимит forgot (>3/час
с IP → 429).

Оба сценария зелёные, багов в этих областях нет.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 11:56:29 +05:00

24 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: platform-smtp
description: |
SuperAdmin Platform Settings — SMTP (ТЗ 2.9): сохранение настроек, причина
изменения обязательна (≥10), пароль шифруется и никогда не возвращается,
сентинел "__clear__" очищает пароль, test-send без настроек → 400.
preconditions:
reset_db: true
smoke_login_super_admin: true
steps:
- id: step01_clean_state
title: "Сброс SMTP в чистое состояние (hasSmtpPassword=false, host пуст)"
- id: step02_reason_required
title: "PUT без причины / причина <10 → 400"
- id: step03_test_send_not_configured
title: "test-send при ненастроенном SMTP → 400"
- id: step04_save_smtp
title: "Сохранение SMTP с паролем → 204, GET отдаёт поля кроме пароля"
- id: step05_password_encrypted
title: "Пароль в БД зашифрован (не плейнтекст) и не возвращается клиенту"
- id: step06_clear_password
title: "PUT newSmtpPassword=__clear__ → hasSmtpPassword=false"