v3.23.9 review: the counter-low exemption and the hint cleanup

Review fixes for the CAP compatibility test suggestion:

- A cntr_low rejection is exempt from both the failure hint and the
  one-click button: the card never executed the command (the packet's
  counter was rejected), so the counter box is the actionable path -
  the v3.6.58 rule that a low counter is never retried.
- The INSTALL [for load] advice names the cascade action: the package
  row's "Delete All" (a plain delete of a package with related objects
  can be refused), in EN and RU.
- The RU LOAD hint quotes the RU button label ("Все 0.0" rather than
  the English "Set all 0.0").
- Two orphaned LANG_RU entries from the replaced hint strings removed
  (the i18n test only checks the missing direction, so they survived).

Tests: the counter-low exemption, the cascade wording and the button
guard pin.  862 frontend + 842 Python; sw cache simple-v422.
This commit is contained in:
2026-10-09 22:58:43 +03:00
parent 1473396e5b
commit 9b4114012b
2 changed files with 17 additions and 6 deletions
+8
View File
@@ -482,7 +482,13 @@ test('ramInstallFailHint names the CAP import requirement for a rejected LOAD',
steps: [{ name: 'INSTALL [for load]', por_sw: '6985' }] }, null);
assert.ok(installFail.includes('refused to open the load file'), installFail);
assert.ok(installFail.includes('delete it first'), installFail);
assert.ok(installFail.includes('Delete All'), installFail);
assert.ok(!installFail.includes('compatibility test'), installFail);
// a low-counter rejection is not a CAP problem: the card never executed
// the command, so the hint stays silent (the counter box is the action)
assert.strictEqual(ramInstallFailHint(
{ success: false, failed_step: 2, cntr_low: true,
steps: [{ name: 'INSTALL [for load]' }, { name: 'LOAD (1/240)' }] }, null), '');
// only a load-related step gets the hint
assert.strictEqual(ramInstallFailHint(
{ success: false, failed_step: 2, steps: [{ name: 'INSTALL [for load]' }, { name: 'INSTALL [for install]' }] }, null), '');
@@ -504,6 +510,8 @@ test('the failed install offers the one-click compatibility test', () => {
const install = extractFunc(html, 'ramShowInstallResult');
assert.ok(install.includes('ramRunCompatTest()'), install.slice(0, 400));
assert.ok(install.includes("t('Run the CAP compatibility test')"), install);
// a low-counter rejection keeps the counter box as the only action
assert.ok(install.includes('!spCntrLow(data)'), install);
const run = extractFunc(html, 'ramRunCompatTest');
assert.ok(run.includes("sel.value = 'compat'"), run);
assert.ok(run.includes('ramOpChanged()'), run);