'use strict'; /* * Freeze / Copy / Clear on the live debug panel, and the gap between the control row and the info * grid. * * Freeze is the one with a real design decision in it. A log you froze to read something is the * exact moment the lines that EXPLAIN it are still arriving, so freezing holds the view still and * keeps buffering underneath — it does not pause the stream. Dropping them would throw away the * part the operator was about to want, and the panel would have lied about being a live log. */ const { test } = require('node:test'); const assert = require('node:assert/strict'); const fs = require('fs'); const path = require('path'); const ROOT = path.join(__dirname, '..', '..'); const read = (p) => fs.readFileSync(path.join(ROOT, p), 'utf8'); const DETAIL = read('frontend/js/views/device-detail.js'); const EN = read('frontend/js/i18n/en.js'); // ------------------------------------------------------------------ layout test('the control row is separated from the info grid', () => { // They rendered flush against each other: the buttons sat directly on top of the STATUS card // with no gap, so the destructive ones read as part of the status panel. const row = DETAIL.slice(DETAIL.indexOf('