summaryrefslogtreecommitdiff
path: root/test/web-snapshots/touch.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'test/web-snapshots/touch.mjs')
-rw-r--r--test/web-snapshots/touch.mjs20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/web-snapshots/touch.mjs b/test/web-snapshots/touch.mjs
index ecd8a9a3..e65fdb80 100644
--- a/test/web-snapshots/touch.mjs
+++ b/test/web-snapshots/touch.mjs
@@ -79,6 +79,22 @@ export default async function ({ grid, touch, wait, stable, delay, evaluate, mou
renderer.render();
result.closedGapBorders=borders();
result.borderChangeInvalidates=renderer.layerRoot.firstChild!==withGap;
+ const tagValues=[2,2,0,42,1,0,1,1,1,1,0x334455];
+ wasm.pardes_tag_layer_limit=()=>1;
+ wasm.pardes_tag_layer_value=(_,field)=>tagValues[field];
+ wasm.pardes_tag_layer_cells=()=>1024;
+ wasm.pardes_tagline_band_offset=()=>2560;
+ renderer.render();
+ const tag=renderer.tagRoot.firstChild;
+ result.tag={left:parseFloat(tag.style.left),top:parseFloat(tag.style.top),width:parseFloat(tag.style.width),
+ text:tag.textContent,cursor:tag.querySelector('.is-cursor')?.textContent,
+ gripVisible:renderer.cells[0].style.visibility,covered:renderer.cells[1].style.visibility,
+ background:tag.style.backgroundColor};
+ renderer.render();
+ result.tag.cached=renderer.tagRoot.firstChild===tag;
+ tagValues[10]=0x556677;
+ renderer.render();
+ result.tag.bgInvalidates=renderer.tagRoot.firstChild!==tag;
root.remove();return result;
})()`);
assert.deepEqual(compactGeometry.bands, [[0,10],[10,20],[30,20]], "compact headers release real height to additional body rows");
@@ -90,6 +106,10 @@ export default async function ({ grid, touch, wait, stable, delay, evaluate, mou
assert.deepEqual(compactGeometry.closedGapBorders,[30]);
assert(compactGeometry.borderChangeInvalidates,"separator changes invalidate an otherwise unchanged layer");
+ assert.deepEqual(compactGeometry.tag, {left:10,top:10,width:10,text:"AB",cursor:"B",
+ gripVisible:"",covered:"hidden",background:"rgb(51, 68, 85)",cached:true,bgInvalidates:true},
+ "tag text uses its own columns after a fixed body-width grip, with cursor and cached base background");
+
let frame = await grid();
assert.equal(tags(frame).length, 1);
styled(frame);