food-market/tests/e2e/scenarios/catalog-edge.yml
nns 9f0f071193 test(e2e): scenarios auth-edge, catalog-edge, stock-invariant-deep
- auth-edge (10 шагов): refresh rotation/redemption, подделка JWT,
  деактивированный user, архивная орг, повторный/orphan signup.
- catalog-edge (12 шагов): валидация товара, дубль артикула, удаление
  групп/единиц/системных типов цен с зависимостями, FK-guard контрагента.
- stock-invariant-deep (10 шагов): инвариант Stock == SUM(StockMovement)
  через post/unpost/repost и конкурентные продажи.

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

36 lines
1.9 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: catalog-edge
description: |
Краевые случаи CRUD справочников: дубликаты, FK-защита при удалении,
валидация пустых/слишком длинных/отрицательных значений, циклы в
иерархии групп. Все эти проверки защищают целостность справочников.
preconditions:
reset_db: true
smoke_login_super_admin: true
steps:
- id: step01_bootstrap
title: "Орг + admin + lookups"
- id: step02_empty_product_name_rejected
title: "POST product с пустым name → 400"
- id: step03_negative_price_rejected
title: "POST product с отрицательной ценой amount=-100 → 400"
- id: step04_oversized_name_truncated_or_rejected
title: "POST product с name > 500 символов → 400 (превышение maxLength)"
- id: step05_duplicate_product_article
title: "POST второго product с тем же article → 4xx (если уникальный) или OK + проверка БД"
- id: step06_self_parent_group_rejected
title: "POST product-group с parentId=собственный id (цикл) → 400"
- id: step07_delete_group_with_children
title: "DELETE group у которой есть подгруппы → 409"
- id: step08_delete_group_with_products
title: "DELETE group в которой есть продукты → 409"
- id: step09_delete_unit_with_products
title: "DELETE enable у unit, на которую ссылаются продукты → 409"
- id: step10_delete_system_price_type
title: "DELETE PriceType.IsSystem=true → 409"
- id: step11_second_retail_price_type
title: "POST PriceType с IsRetail=true когда уже есть Retail → 409"
- id: step12_delete_counterparty_with_supply
title: "DELETE counterparty который использован в Supply → 409"