This commit is contained in:
@@ -63,3 +63,23 @@ def test_dashboard_match_status_distinguishes_expired_and_legacy_rows():
|
||||
assert expired["tone"] == "watch"
|
||||
assert legacy["label"] == "舊版配對待重驗"
|
||||
assert "identity_v2" in legacy["summary"]
|
||||
|
||||
|
||||
def test_dashboard_match_status_explains_identity_veto_reason():
|
||||
from routes.dashboard_routes import _build_pchome_match_status
|
||||
|
||||
bundle = _build_pchome_match_status({
|
||||
"attempt_status": "identity_veto",
|
||||
"best_match_score": 0.32,
|
||||
"error_message": "score=0.32; reasons=bundle_offer_conflict,product_line_conflict",
|
||||
})
|
||||
refill = _build_pchome_match_status({
|
||||
"attempt_status": "identity_veto",
|
||||
"best_match_score": 0.32,
|
||||
"error_message": "score=0.32; reasons=refill_pack_conflict",
|
||||
})
|
||||
|
||||
assert bundle["label"] == "組合差異待審"
|
||||
assert "組合包/多件組" in bundle["summary"]
|
||||
assert refill["label"] == "補充包差異待審"
|
||||
assert "補充瓶/補充包" in refill["summary"]
|
||||
|
||||
Reference in New Issue
Block a user