v3.23.6: the event name keywords in the test-script editor

A script's `event` value may be a code (a hex byte or a number) or one of the
server's name keywords (location_status, access_tech, network_rejection,
data_connection, ... - events.py's EVENT_NAMES); the API accepts both.  The
PWA parsed every value as a hex string: the step list showed
'EVENT 0xaccess_tech' (the unparsed fallback), the editor fell back to event
03 (Location status) with the location field set, and saving then rewrote
the step to that event - silently corrupting name-authored scripts (the two
Alfa2G trigger scripts use access_tech/data_connection).

A mirrored EVENT_ALIASES map plus an eventCode() resolver (number / hex byte
/ name -> code) now feed the step summary, the editor's event block and the
event check; the summary's fallback no longer prefixes a non-numeric value
with 0x, and the editor keeps its canonical hex form on save (the same code).

Drift guard: the aliases live in frontend/tests/event_vectors.json, asserted
by the Node test (the PWA's map + resolver) and the Python test
(events.EVENT_NAMES + resolve_event).  Tests: 856 frontend + 839 Python;
sw cache simple-v419.
This commit is contained in:
2026-10-07 21:56:20 +03:00
parent 02a78fcca6
commit 9fb46b786f
9 changed files with 110 additions and 11 deletions
+4
View File
@@ -321,6 +321,10 @@ from the form's source field; an explicit `src` overrides it. Both the
"lac": "00FF", "cell": "0001"}}}
```
The `event` value may be the code (a hex byte or a number) or one of the name
keywords above; the editor resolves either form to the event - showing the
right form and fields - and saves the hex byte form.
| `event` | fields |
|---|---|
| `location_status` / `0x03` | `status` 0 normal / 1 limited / 2 no service; for normal service `mcc`, `mnc`, `lac`, `cell` |