feat: Test script pill in the Phone simulator (v3.5.11)
- Phone simulator tab: a fourth pill **Test script** - script list (localStorage `simple_tests`) with New/Clone/Delete/Export/Import, a form-based step editor (modal) and a run panel. - Actions: ENVELOPE (Event Download), Menu Selection, UPDATE/READ file by path, raw APDU, SCP80 (C-APDU or a pre-built packet, per-step TAR/SPI1/ SPI2 overrides; the preset is matched by the equipped card's ICCID and the final counter is written back) and STATUS with an optional poll. Every action has SW/data checks (exact or ?-mask) and a PoR check for SCP80, with an error (stops) / warning (continues) fail level. - Expectations: FETCH the command announced by the previous step, verify type/qualifier/text/item/raw and answer with the scripted TERMINAL RESPONSE (result, item id, text, extra TLVs); templates for STK menu browsing and an applet via SCP80. - Run panel: progress banner (plus a marker on the pill), per-step OK/Warning/Error badges with expected vs actual values, sent/received hex, decoded commands and the SCP80 counter; 500 ms polling while a run is active, and a running script disables other card controls (data-needs gate; the server answers 409 to other card endpoints). - Help EN/RU (8.9 Test script), AGENTS; version 3.5.11; sw simple-v264. 579 frontend / 467 Python green.
This commit is contained in:
@@ -30,6 +30,7 @@ const code = extractFunc(html, 'phoneSwitchSubtab') + '\n' +
|
||||
'globalThis.pysimPliRender = () => { globalThis._pli = (globalThis._pli || 0) + 1; };\n' +
|
||||
'globalThis.tpRefresh = () => { globalThis._tp = (globalThis._tp || 0) + 1; };\n' +
|
||||
'globalThis.esimFetchAll = () => { globalThis._esim = (globalThis._esim || 0) + 1; };\n' +
|
||||
'globalThis.testInit = () => { globalThis._test = (globalThis._test || 0) + 1; };\n' +
|
||||
'globalThis.netStateFetch = () => { globalThis._netstate = (globalThis._netstate || 0) + 1; };\n';
|
||||
eval(code);
|
||||
|
||||
@@ -46,11 +47,13 @@ function setup() {
|
||||
{ dataset: { phoneSub: 'phone' }, classList: makeClassList() },
|
||||
{ dataset: { phoneSub: 'tr' }, classList: makeClassList() },
|
||||
{ dataset: { phoneSub: 'esim' }, classList: makeClassList() },
|
||||
{ dataset: { phoneSub: 'test' }, classList: makeClassList() },
|
||||
];
|
||||
const panels = {
|
||||
'phone-sub-phone': { classList: makeClassList() },
|
||||
'phone-sub-tr': { classList: makeClassList() },
|
||||
'phone-sub-esim': { classList: makeClassList() },
|
||||
'phone-sub-test': { classList: makeClassList() },
|
||||
};
|
||||
globalThis.document = {
|
||||
querySelectorAll: sel => (sel === '.phone-subtab' ? buttons : []),
|
||||
@@ -59,6 +62,7 @@ function setup() {
|
||||
globalThis._anchor = null;
|
||||
globalThis._stk = globalThis._events = globalThis._log = globalThis._poll = globalThis._pli = globalThis._tp = 0;
|
||||
globalThis._esim = globalThis._netstate = 0;
|
||||
globalThis._test = 0;
|
||||
return { buttons, panels };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user