feat: custom labels toggle and inline editing in product list

Adds session-based show/hide toggle for custom labels in admin product list, inline editable fields for custom_label_0..4, and label suggestions with custom entry support. Includes repository/controller updates, UI fixes, tests, and PAUL docs release updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jacek
2026-04-19 11:09:19 +02:00
parent 41e491c6b7
commit 9577d4944a
15 changed files with 856 additions and 42 deletions

View File

@@ -1,11 +1,11 @@
# Testing Patterns
# Testing Patterns
## Overview
| Metric | Value |
|--------|-------|
| Total tests | **810** |
| Total assertions | **2264** |
| Total tests | **828** |
| Total assertions | **2306** |
| Framework | PHPUnit 9.6 (`phpunit.phar`) |
| Bootstrap | `tests/bootstrap.php` |
| Config | `phpunit.xml` |
@@ -13,7 +13,7 @@
## Running Tests
```bash
# Full suite (PowerShell recommended)
# Full suite (PowerShell — recommended)
./test.ps1
# Specific file
@@ -36,16 +36,16 @@ Tests mirror source structure:
```
tests/Unit/
├── Domain/
│ ├── Product/ProductRepositoryTest.php
│ ├── Category/CategoryRepositoryTest.php
│ ├── Order/OrderRepositoryTest.php
│ └── ... (all 29 modules covered)
├── admin/Controllers/
│ ├── ShopCategoryControllerTest.php
│ └── ...
└── api/
└── ...
├── Domain/
│ ├── Product/ProductRepositoryTest.php
│ ├── Category/CategoryRepositoryTest.php
│ ├── Order/OrderRepositoryTest.php
│ └── ... (all 29 modules covered)
├── admin/Controllers/
│ ├── ShopCategoryControllerTest.php
│ └── ...
└── api/
└── ...
```
## Test Class Pattern
@@ -229,13 +229,13 @@ $this->assertInstanceOf(ClassName::class, $obj);
## What's Covered
- All 29 Domain repositories
- Core business logic (quantity, pricing, category tree)
- Query behavior with mocked Medoo
- Cache patterns
- Controller constructor injection
- `FormValidator` behavior
- API controllers
- All 29 Domain repositories âś“
- Core business logic (quantity, pricing, category tree) âś“
- Query behavior with mocked Medoo âś“
- Cache patterns âś“
- Controller constructor injection âś“
- `FormValidator` behavior âś“
- API controllers âś“
## What's Lightly Covered
@@ -243,3 +243,4 @@ $this->assertInstanceOf(ClassName::class, $obj);
- Session state in tests
- AJAX response integration
- Frontend Views (static classes)