fix(client): stop unsafe T-106 confirmation path

This commit is contained in:
QiuSW
2026-08-06 10:44:00 +08:00
parent b0b71d5a29
commit e93e2e8202
5 changed files with 46 additions and 45 deletions
+9 -3
View File
@@ -1,4 +1,4 @@
"""T-106 确认页四态纯只读取证的离线测试。"""
"""T-106 提交前来源态纯只读取证的离线测试。"""
from __future__ import annotations
@@ -229,8 +229,8 @@ class OrderConfirmEvidenceTests(unittest.TestCase):
timeout_seconds=2,
)
def test_all_four_human_states_publish_only_raw_read_evidence(self) -> None:
self.assertEqual(len(DECLARED_STATES), 4)
def test_only_approved_human_state_publishes_raw_read_evidence(self) -> None:
self.assertEqual(DECLARED_STATES, ("gate2-navigation-source",))
for state in DECLARED_STATES:
with self.subTest(state=state), TemporaryDirectory() as temporary:
adb = FakeAdbClient()
@@ -276,6 +276,9 @@ class OrderConfirmEvidenceTests(unittest.TestCase):
("", EXPECTED_GOODS_ID, DECLARED_STATES[0]),
(f" {SERIAL}", EXPECTED_GOODS_ID, DECLARED_STATES[0]),
(SERIAL, "958756616606", DECLARED_STATES[0]),
(SERIAL, EXPECTED_GOODS_ID, "confirm-gate3"),
(SERIAL, EXPECTED_GOODS_ID, "submit-control-visible"),
(SERIAL, EXPECTED_GOODS_ID, "returned-safe-page"),
(SERIAL, EXPECTED_GOODS_ID, "unknown"),
)
for serial, goods_id, state in scenarios:
@@ -465,6 +468,9 @@ class OrderConfirmCliAndStaticBoundaryTests(unittest.TestCase):
_namespace(serial=""),
_namespace(serial=f" {SERIAL}"),
_namespace(goods_id="958756616606"),
_namespace(state="confirm-gate3"),
_namespace(state="submit-control-visible"),
_namespace(state="returned-safe-page"),
_namespace(state="unknown"),
_namespace(output_dir=Path("")),
_namespace(timeout=0),