From e8c991648d8af07aa8939c1fa8af94f92a778e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Wed, 7 Oct 2026 10:34:37 +0300 Subject: [PATCH] v3.23.3 review: pin the notice box targeting with a DOM test The review of 1786300 found the box targeting pinned only by source-pattern assertions. The new test drives ramShowCntrLow through the fake document and asserts the notice lands in the originating view's box (and hides the other one), so a regression to the static '#ram-cntr-low' lookup fails behaviourally, not just textually. 847 frontend + 830 Python. --- frontend/tests/ram.test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/frontend/tests/ram.test.js b/frontend/tests/ram.test.js index 4bdb9f8..1d2e0d7 100644 --- a/frontend/tests/ram.test.js +++ b/frontend/tests/ram.test.js @@ -928,6 +928,26 @@ test('ramCntrLowHtml states the facts without a fabricated counter', () => { assert.match(html, /id="sp-cntr-low"/); }); +test('ramShowCntrLow targets the originating view box', () => { + // the notice must land in the pill the failed operation ran in: the + // Secured packet notice used to be written into the hidden RAM container, + // so the buttons were unreachable from the plain send (v3.23.3) + globalThis.t = s => s; + const els = fakeRamDocument(['ram-cntr-low', 'sp-cntr-low']); + ramShowCntrLow(2, 'sp'); + assert.ok(els['sp-cntr-low'].innerHTML.includes("ramSyncCounter(2, 'sp')"), + els['sp-cntr-low'].innerHTML); + assert.ok(!els['sp-cntr-low'].classList.contains('hidden')); + assert.strictEqual(els['ram-cntr-low'].innerHTML, ''); + assert.ok(els['ram-cntr-low'].classList.contains('hidden')); + ramShowCntrLow(1, 'ram'); + assert.ok(els['ram-cntr-low'].innerHTML.includes("ramSyncCounter(1, 'ram')"), + els['ram-cntr-low'].innerHTML); + assert.ok(!els['ram-cntr-low'].classList.contains('hidden')); + assert.ok(els['sp-cntr-low'].classList.contains('hidden')); + delete globalThis.t; +}); + test('the explorer shows versions on app and ISD rows too', () => { globalThis.t = s => s; const out = ramRenderExploreHtml(null,