Test dashboard: full menu system, all-service tests, filtering
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m11s

- Run tests for all 10 services via per-service pytest subprocesses
- Group results by service with section headers
- Clickable summary cards filter by outcome (passed/failed/errors/skipped)
- Service filter nav using ~nav-link buttons in menu bar
- Full menu integration: ~header-row + ~header-child + ~menu-row
- Show logo image via cart-mini rendering
- Mount full service directories in docker-compose for test access
- Add 24 unit test files across 9 services

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 22:54:25 +00:00
parent 81e51ae7bc
commit 3809affcab
41 changed files with 2484 additions and 110 deletions

View File

View File

@@ -0,0 +1,66 @@
"""Unit tests for relations serialization."""
from __future__ import annotations
from types import SimpleNamespace
import pytest
from relations.bp.data.routes import _serialize_rel
class TestSerializeRel:
def test_all_fields(self):
rel = SimpleNamespace(
id=1,
parent_type="page",
parent_id=100,
child_type="calendar",
child_id=200,
sort_order=0,
label="Main Calendar",
relation_type="container",
metadata_={"key": "val"},
)
result = _serialize_rel(rel)
assert result == {
"id": 1,
"parent_type": "page",
"parent_id": 100,
"child_type": "calendar",
"child_id": 200,
"sort_order": 0,
"label": "Main Calendar",
"relation_type": "container",
"metadata": {"key": "val"},
}
def test_none_optionals(self):
rel = SimpleNamespace(
id=2,
parent_type="post",
parent_id=1,
child_type="market",
child_id=1,
sort_order=1,
label=None,
relation_type=None,
metadata_=None,
)
result = _serialize_rel(rel)
assert result["label"] is None
assert result["relation_type"] is None
assert result["metadata"] is None
def test_dict_structure(self):
rel = SimpleNamespace(
id=3, parent_type="a", parent_id=1,
child_type="b", child_id=2,
sort_order=0, label="", relation_type="link",
metadata_={},
)
result = _serialize_rel(rel)
assert set(result.keys()) == {
"id", "parent_type", "parent_id",
"child_type", "child_id", "sort_order",
"label", "relation_type", "metadata",
}