Regression test for the zero-length-emit tile corruption (companion to #84) #85
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "StoneCypher/view:test-tile-corruption-regression"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Optional companion to #84 -- a regression test for the tile-tree corruption
that PR fixes. Kept as a separate PR so it can be adopted (or not)
independently of the fix.
Why it's a Node-side test, not a webtest
The corruption only reproduces under trusted input (a real drag).
Synthetic DOM events and programmatic
dispatch({selection})do not triggerit, so an in-page
webtest-*cannot catch it. This is atest-*(Node-side,run by
cm-runtestsvia Mocha) that drives a real pointer through Selenium'sActions API.
selenium-webdriveris already a dependency of@marijn/testtool, and it needs a Chrome/chromedriver like the webtest suite.What it checks
It builds a view with a whole-document mark (a lint diagnostic with no source
position) plus
highlightActiveLine, performs a real drag-select + blank-lineclick, and asserts the tile invariant:
0 for a healthy tree; > 0 once a line's tile is dropped.
Status
main(the bug is still present) -- by design; thisis the reproduction.
So the intended order is: merge #84, then this. Merging this alone will (
correctly) fail CI until the fix lands.
Notes
// @ts-nocheck: Node builtins andselenium-webdriverare untyped in this repo (no
@types/node/@types/selenium-webdriver), sothe Node-side test is transpiled, not type-checked. It compiles cleanly
through
cm-buildhelperas-is. Happy to type it properly instead if you'dprefer adding those dev types.
loads and stops at the first observed deficit, so it's fast when red and
runs the full budget (~30s) when green.
Thanks for the
Pull request closed