Commit Graph

4 Commits

Author SHA1 Message Date
384f3c22f8 Удалена вся документация .md из репозитория
- Удалены все файлы .md (30 файлов)
- Добавлена маска *.md в .gitignore для защиты от будущих коммитов
- Причина: .md файлы содержали примеры паролей и внутреннюю документацию

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 15:05:46 +03:00
93e4c9b600 test: update order status transition tests with real system statuses
- Added all real order statuses: new, confirmed, in_assembly, in_delivery, return
- Test #2: expanded to test cancellation from 4 different statuses (new, confirmed, in_assembly, in_delivery)
- Test #3: updated to use new → cancelled → in_assembly flow
- Test #4: updated to use in_delivery status instead of packing
- All 5 tests passing successfully
2025-12-01 13:46:17 +03:00
f4bb9d9e1e Исправлено: использовать hex коды вместо названий цветов в тестах
Проблема:
- Поле OrderStatus.color имеет max_length=7 (для hex типа #FF5733)
- В тестах использовались названия: 'secondary', 'warning', 'success' (9 символов)
- PostgreSQL выдавал ошибку: value too long for type character varying(7)

Решение:
- Заменены названия цветов на hex коды:
  * 'secondary' → '#9E9E9E' (серый)
  * 'warning' → '#FF9800' (оранжевый)
  * 'success' → '#4CAF50' (зелёный)
  * 'danger' → '#F44336' (красный)
  * 'info' → '#17A2B8' (голубой)
2025-12-01 13:03:31 +03:00
d023d1ab25 Added 5 critical tests for order status transitions
Tests cover:
1. Multiple status transitions (draft->completed->cancelled->completed)
2. Cancellation from draft (reservation release)
3. Un-cancellation to pending (reservation restore)
4. Creating order with intermediate status
5. Rollback from completed to draft

Each test verifies:
- Stock state (available, reserved, free)
- Reservation status transitions
- Sale creation/deletion without duplicates
- StockBatch quantity changes

Files:
- inventory/tests/test_order_status_transitions.py (570 lines)
- inventory/tests/README.md (138 lines)
- inventory/tests/__init__.py
- run_status_tests.bat (launch script)
2025-12-01 12:42:37 +03:00