v3.13.0: the Simulator's event forms honour the preset's CAT release
The consumption half of the release guard: the event-download forms hide the parameters introduced after the effective release and say so. - catEffectiveReleaseInfo(cards, iccid): the equipped card's preset (ICCID match, the same rule the SCP80 views use) resolved through presetRelease(), else the default Rel-12. - eventFieldsForRelease(cfg, rel): a field whose introduction release (`rel`) is above the effective one is hidden; a field without a known release is never hidden. The EVENT_FORMS annotations verified against the pinned specs/histories: the MT call IMS URI (Rel-12, CR 12.4.0 "URI support in MT Call event"), the CSG cell selection PLMN ID (Rel-12, 12.1.0), the IMS registration IMPU list + status code (Rel-11), the slices S-NSSAI-mapping and rejected objects (Rel-18). - The form notes what was hidden: "hidden parameters: N · introduced after Rel-12 · preset: X" (or "default release"), with a tooltip naming the source; the send path already skips absent fields, so no builder changes. - help EN/RU; sw cache simple-v369.
This commit is contained in:
@@ -34,6 +34,8 @@ eval(extractBlock('const CAT_RELEASE = {', '// The display label of an introduct
|
||||
eval(extractFunc(html, 'catReleaseLabel'));
|
||||
eval(extractBlock('const CAT_RELEASE_DEFAULT', 'function presetRelease').replace(/^const /gm, 'var '));
|
||||
eval(extractFunc(html, 'presetRelease'));
|
||||
eval(extractFunc(html, 'cardsNormIccid'));
|
||||
eval(extractFunc(html, 'catEffectiveReleaseInfo'));
|
||||
eval(extractBlock('const EVENT_NAMES = {', 'const REJECTION_CAUSES = [').replace(/^const /gm, 'var '));
|
||||
|
||||
test('CAT_RELEASE carries the introduction releases of the event list', () => {
|
||||
@@ -91,3 +93,19 @@ test('presetRelease resolves unspecified presets to the default', () => {
|
||||
assert.strictEqual(presetRelease(p), CAT_RELEASE_DEFAULT, JSON.stringify(p));
|
||||
}
|
||||
});
|
||||
|
||||
test('catEffectiveReleaseInfo resolves the equipped preset or the default', () => {
|
||||
const list = [{ name: 'A', iccid: '89 70 1190 0000 4600 098', release: '17' },
|
||||
{ name: 'B', iccid: '', release: '14' }];
|
||||
const hit = catEffectiveReleaseInfo(list, '8970119000004600098');
|
||||
assert.strictEqual(hit.rel, 17);
|
||||
assert.strictEqual(hit.source, 'preset');
|
||||
assert.strictEqual(hit.preset.name, 'A');
|
||||
// an ICCID that matches no preset (and the empty one) resolves to the default
|
||||
const miss = catEffectiveReleaseInfo(list, '8970119000004600099');
|
||||
assert.strictEqual(miss.rel, CAT_RELEASE_DEFAULT);
|
||||
assert.strictEqual(miss.source, 'default');
|
||||
assert.strictEqual(miss.preset, null);
|
||||
assert.strictEqual(catEffectiveReleaseInfo(list, '').source, 'default');
|
||||
assert.strictEqual(catEffectiveReleaseInfo([], '8970119000004600098').rel, CAT_RELEASE_DEFAULT);
|
||||
});
|
||||
|
||||
@@ -34,6 +34,7 @@ eval(extractFunc(html, 'cmdQualifierShort'));
|
||||
eval(extractBlock('const EVENT_NAMES = {', 'const REJECTION_CAUSES = [').replace(/^const /gm, 'var '));
|
||||
eval(extractBlock('const REJECTION_CAUSES = [', 'const EVENT_FORMS = {').replace(/^const /gm, 'var '));
|
||||
eval(extractBlock('const EVENT_FORMS = {', 'const PLI_QUALIFIERS = [').replace(/^const /gm, 'var '));
|
||||
eval(extractFunc(html, 'eventFieldsForRelease'));
|
||||
eval(extractFunc(html, 'encPlmn'));
|
||||
eval(extractFunc(html, 'bytesToHex'));
|
||||
|
||||
@@ -249,3 +250,25 @@ test('the disconnected/rejection/CAG/slices events carry their extra objects', (
|
||||
rejected_map: '01020304', rejected: '01020304' })
|
||||
.endsWith('F70401020304F80401020304D70401020304B10401020304'));
|
||||
});
|
||||
|
||||
test('event fields introduced after the effective release are hidden', () => {
|
||||
// MT call: the IMS URI came with the Rel-12 URI support (12.4.0)
|
||||
let r = eventFieldsForRelease(EVENT_FORMS[0x00], 11);
|
||||
assert.deepStrictEqual(r.hidden.map(f => f.id), ['ims_uri']);
|
||||
assert.ok(r.fields.some(f => f.id === 'ti'));
|
||||
assert.strictEqual(eventFieldsForRelease(EVENT_FORMS[0x00], 12).hidden.length, 0);
|
||||
// CSG cell selection: the PLMN ID came in 12.1.0
|
||||
r = eventFieldsForRelease(EVENT_FORMS[0x15], 11);
|
||||
assert.deepStrictEqual(r.hidden.map(f => f.id).sort(), ['mcc', 'mnc']);
|
||||
// IMS registration: the IMPU list and the status code came in Rel-11
|
||||
r = eventFieldsForRelease(EVENT_FORMS[0x17], 10);
|
||||
assert.deepStrictEqual(r.hidden.map(f => f.id).sort(), ['code', 'impu']);
|
||||
// slices: the mapping/rejected objects came in Rel-18
|
||||
r = eventFieldsForRelease(EVENT_FORMS[0x1F], 16);
|
||||
assert.deepStrictEqual(r.hidden.map(f => f.id).sort(), ['allowed_map', 'rejected', 'rejected_map']);
|
||||
assert.strictEqual(eventFieldsForRelease(EVENT_FORMS[0x1F], 18).hidden.length, 0);
|
||||
// a field without a known release is never hidden
|
||||
r = eventFieldsForRelease(EVENT_FORMS[0x12], 4);
|
||||
assert.strictEqual(r.hidden.length, 0);
|
||||
assert.strictEqual(r.fields.length, EVENT_FORMS[0x12].fields.length);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user