From c5e7419b89e614d9bcc5600193c1e4f2d7d4f935 Mon Sep 17 00:00:00 2001 From: Jackson Kupris Date: Tue, 24 Nov 2026 17:24:19 -0600 Subject: [PATCH] Fixed the 3D help test to use the new Neural help wording #264 renamed the 80/20 and speed entries, and test_depth still looked for the old names, which turned main red. --- tests/test_depth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_depth.js b/tests/test_depth.js index 82934cb..c286af8 100644 --- a/tests/test_depth.js +++ b/tests/test_depth.js @@ -49,7 +49,7 @@ const fs = require("fs"), path = require("path"), sleep = ms => new Promise(r => // the Hz and everything else on the readout are explained, one click away, and the card goes away again await tab.ev(`${D}.drawNow()`); await sleep(150); check(await tab.ev(`(() => { const b = document.querySelector(".vg-viewhelp"), r = b.getBoundingClientRect(); return !b.hidden && r.width > 0 && document.elementFromPoint(r.x + r.width / 2, r.y + r.height / 2) === b; })()`), "the neural view's help button should be there to press"); - await tab.ev(`document.querySelector(".vg-viewhelp").click()`); const card = await tab.ev(`(() => { const c = document.querySelector(".vg-viewcard"); return !c.hidden && c.getBoundingClientRect().height > 40 ? c.textContent : ""; })()`); for (const w of ["Hz", "spikes per note", "80/20", "×1/25", "thalamus"]) check(card.includes(w), `the help card should explain ${w}`); + await tab.ev(`document.querySelector(".vg-viewhelp").click()`); const card = await tab.ev(`(() => { const c = document.querySelector(".vg-viewcard"); return !c.hidden && c.getBoundingClientRect().height > 40 ? c.textContent : ""; })()`); for (const w of ["Hz", "spikes per note", "80% of cells", "Slowed ×25", "thalamus"]) check(card.includes(w), `the help card should explain ${w}`); await tab.ev(`document.querySelector(".vg-viewhelp").click()`); check(await tab.ev(`document.querySelector(".vg-viewcard").hidden`), "the help card should close"); const before = await tab.ev(`${D}.neuro().spikes`); for (let i = 0; i < 40; i++) { await tab.ev(`${D}.drawNow(performance.now())`); await sleep(50); } const after = await tab.ev(`${D}.neuro()`); check(after.spikes > before, `the network should fire: ${before} then ${after.spikes}`); check(after.ok, `a neuron broke the model's limits: ${JSON.stringify(after)}`);