auu
This commit is contained in:
parent
d995726462
commit
0a343ecbc5
326 changed files with 15584 additions and 0 deletions
20
test/v4777-hud-input-performance-smoke-test.js
Normal file
20
test/v4777-hud-input-performance-smoke-test.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
const {assert,functionSource,app,css}=require('./helpers/app-source');
|
||||
const hud=functionSource('boardPlayHudVisible'),select=functionSource('selectBoard'),center=functionSource('centerMeta');
|
||||
assert(hud.includes('hudBoardId===b?.id'),'HUD must use explicit session selection, not drag/claim state');
|
||||
assert(select.includes('hudBoardId=b.id')&&select.includes("classList.add('hud-current')"),'Click selection must persist the board HUD');
|
||||
assert(center.includes('select=true')&&app.includes("centerMeta(initialMeta||data.metas.B0,{select:false})"),'Startup camera centering must not select an untouched board');
|
||||
assert(functionSource('resetSelectedBoard').includes('rendered.get(hudBoardId)'),'Reset must target the persistent HUD selection');
|
||||
assert(!css.includes("body.is-drawing .board-card:not(.input-active) .static-layer"),'Non-selected boards must not be dimmed while drawing');
|
||||
const sanitize=functionSource('sanitizeStateForPuzzle');
|
||||
assert(sanitize.includes('path.detachedStart&&path.endGate==null')&&sanitize.includes('warpKeys.has'),'Loose lines with both knobs on warp cells must be removed');
|
||||
const realtime=functionSource('queueRealtimeCursor');
|
||||
assert(realtime.includes("classList.contains('is-drawing')")&&realtime.includes('realtimePendingCursorClient')&&realtime.indexOf('worldUnitAtClient')>realtime.indexOf('setTimeout'),'Raw pointer events must not perform realtime world conversion or send during drawing');
|
||||
const custom=functionSource('updateCustomCursorFromPointer');
|
||||
assert(custom.includes("dataset.cursorMode==='dom'")&&custom.includes('requestAnimationFrame')&&!custom.includes('FRAME_INTERVAL'),'DOM cursor fallback must remain visible during drag and commit at display cadence');
|
||||
assert(functionSource('syncCursorAppearance').includes('nativeSupported')&&css.includes('data-cursor-mode="native"'),'Static cursor skins must prefer the native cursor path');
|
||||
const drag=functionSource('extendPointerTo'),render=functionSource('renderDragFrame');
|
||||
assert(drag.includes('lastModelProbeKey')&&drag.includes('probeStep=6'),'Drag model work must be quantized instead of repeated for every raw move');
|
||||
assert(render.includes('blended=false')&&render.includes('lastRenderedTip')&&render.includes('setSvgAttr'),'Live drag rendering must avoid gradients and redundant SVG writes');
|
||||
assert(app.includes("const APP_VERSION='47.77'"),'Application version was not advanced');
|
||||
console.log('v47.77 HUD, warp cleanup, cursor, and drag performance regression test passed');
|
||||
Loading…
Add table
Add a link
Reference in a new issue