ui: drop the clipboard/paste JSON buttons from Cards and custom files (v2.5.1)

- Cards and Custom files now expose only Export to file (JSON download) and
  Import from file; the Export-as-JSON / Paste & import / Import-JSON-from-
  clipboard buttons and their paste textareas are gone
- import feedback moves to a transient status line (new ioStatus helper);
  cardsImport/pysimCustomImport no longer read the clipboard
- Network simulation parameters: note under the operator form listing the
  scenarios that use the MCC/MNC (EPS/2G attach and SMS received write real
  LAI/RAI/TAI; cold boot, service lost, limited service and roaming denied
  write dummy files keeping the PLMN; churn/CB/AUTHENTICATE do not use it)
- i18n: removed-button entries dropped, note added EN/RU; help EN/RU updated
- guard tests for the button set and the note; SW cache simple-v196
This commit is contained in:
2026-09-19 23:26:21 +03:00
parent 8848df1c1e
commit 163a859658
7 changed files with 44 additions and 63 deletions
+18
View File
@@ -213,6 +213,7 @@ test('phone simulator has the network-simulation fieldset', () => {
assert.ok(html.includes('id="netsim-log"'));
assert.ok(html.includes('id="netsim-status"'));
assert.match(html, /id="netsim-mcc" value="001"/);
assert.ok(html.includes('data-l10n="Sets the PLMN written to'));
// scenario buttons need the card (the server writes real EFs)
assert.match(html, /data-needs="card" onclick="netSimRun\('service_lost'\)"/);
});
@@ -226,6 +227,23 @@ test('phone simulator action buttons are green and the TP status sits below them
assert.ok(block.lastIndexOf('</div>') > block.lastIndexOf('</button>'));
});
test('cards and custom files expose only file import/export', () => {
assert.ok(!html.includes('data-l10n="Export as JSON"'));
assert.ok(!html.includes('data-l10n="Paste & import"'));
assert.ok(!html.includes('data-l10n="Import JSON from clipboard"'));
for (const fn of ['cardsExportFile', 'cardsImportFile', 'pysimCustomExportFile', 'pysimCustomImportFile']) {
assert.ok(html.includes('function ' + fn + '('), fn);
}
assert.ok(!html.includes('function cardsExport('));
assert.ok(!html.includes('function pysimCustomExport('));
assert.ok(!html.includes('cardsImportField('));
assert.ok(!html.includes('pysimCustomImportField('));
// import feedback goes to the transient status line
assert.ok(html.includes('function ioStatus('));
assert.ok(html.includes("ioStatus('cards-io'"));
assert.ok(html.includes("ioStatus('pysim-cf-io'"));
});
test('SCP81 listener exposes its four modes with the matching notes', () => {
for (const v of ['tls', 'redirect', 'passthru', 'dump']) {
assert.ok(html.includes('value="' + v + '"'), v);