feat: TAR probe becomes its own SCP80 pill with a TAR checklist (v3.8.0)
The probe is not a RAM operation, so it moves out of the RAM view into a third SCP80 pill (Secured packet | RAM | TAR probe, RU "TAR-сканер"), with its own preset and key-version selectors, its own equipped-card mismatch banner and its own result line; the help gains a "3.3 TAR probe" section and the anchor map follows the pill. The TAR field is a checklist now: pre-populated with the standard allocations of TS 101 220 V18.3.0 Annex D, Table D.1 (each row carrying the document it comes from, all checked by default, Select all / Select none), plus custom TARs added through a small form (three hex bytes + an optional description, removed with a x). Custom entries live in localStorage['simple_tar_probe'] on a best-effort basis - losing them is harmless, the standard list is always there. Only the checked TARs are sent; nothing checked is refused with a message. A Python test guards the PWA's list against the server's TAR_PROBE_TARS (the endpoint keeps its own default for API callers). RAM leftovers removed (the tar-probe operation entry, the #ram-tar-rows block, the ramExecute dispatch, ramTarProbe); getRamSpParams() takes the view's selector id; tarRender/tarApplyCard/tarKeysetChanged/tarKeysetGuard mirror the RAM view; spKeysetSync and spPresetWarningRender cover the new selectors. sw cache simple-v338. Tests: 740 Node (the checklist rows, the custom round-trip, the checked-list read, the renderer, the pill wiring) and 619 Python (the list drift guard).
This commit is contained in:
@@ -429,6 +429,21 @@ class CntrLowGuardHttpTests(unittest.TestCase):
|
||||
self.assertEqual(resp['suggested_cntr'], '00000000BC')
|
||||
|
||||
|
||||
class TarProbeListTests(unittest.TestCase):
|
||||
"""The PWA's TAR checklist must match the server's TAR_PROBE_TARS - the
|
||||
panel is pre-populated client-side, the server's list is the API fallback,
|
||||
and both must describe the same allocations (TS 101 220 Annex D)."""
|
||||
|
||||
def test_the_pwa_and_the_server_share_the_standard_tar_list(self):
|
||||
from pysim_simple_server import server as srv
|
||||
html = (ROOT / 'frontend' / 'index.html').read_text(encoding='utf-8')
|
||||
block = html[html.index('const TAR_PROBE_TARS = ['):]
|
||||
block = block[:block.index('\n];')]
|
||||
pwa = re.findall(r"tar:\s*'([0-9A-F]{6})',\s*label:\s*'([^']*)'", block)
|
||||
self.assertEqual(pwa, list(srv.TAR_PROBE_TARS))
|
||||
self.assertTrue(pwa, 'the PWA list must not be empty')
|
||||
|
||||
|
||||
class PresetStoreHttpTests(unittest.TestCase):
|
||||
"""The card preset endpoints (v3.8.0): the PWA's Cards tab talks to the
|
||||
server store instead of localStorage, and the counter an operation
|
||||
|
||||
Reference in New Issue
Block a user