test(runner): sweep the example1 grid before asserting its numeric cells - #336
Open
danielzytohoc wants to merge 1 commit into
Open
test(runner): sweep the example1 grid before asserting its numeric cells#336danielzytohoc wants to merge 1 commit into
danielzytohoc wants to merge 1 commit into
Conversation
The nightly starter matrix went red on `example1 @ 17` and `@ 18` with "numericFormat rendered 87%". The assertion read only the <td>s in the DOM at the initial scroll position, and once #307 let the starter fill its container, the Item Quality column sits past the rendered edge of the 624px preview pane. Handsontable virtualizes columns, and from 17.1.0 `viewportColumnRenderingOffset: "auto"` renders exactly one column beyond the viewport, so the cell was never in the DOM to be read. 15 and 16 still render it by a hair, which is why they stayed green. Scroll the master holder across its full scroll width and assert over the union of everything rendered along the way, inside `expect.poll` so a slow re-render costs a retry rather than a false failure. The numeric formatting itself was never wrong: `87%` renders at 17.1.0 and 18.1.0 once the column is scrolled in.
demtario
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The nightly starter compatibility matrix failed on 2026-09-09 (run 34299201725):
matrix: example1 @ 17 [sandpack]and@ 18red on all three attempts withnumericFormat rendered 87% at 17/18, everything else green, and the Sep 8 run fully green.This is a test defect, not a product one. The assertion added in c447344 reads the
<td>s present in the DOM at the initial scroll position. #307 then removedwidth: 800fromexample1so the grid fills its container, which in the suite's Desktop Chrome viewport is a 624px preview pane holding four of the starter's 150px columns. Item Quality (the87%cell) now sits past the rendered edge, and Handsontable's column virtualization decides whether its<td>exists at all:viewportColumnRenderingOffset: "auto"is a fixed 1 since 17.1.0, so only Item Name → Category are in the DOM.87%is absent until the grid is scrolled.autostill renders one more column, so87is found — as the last rendered column, by a hair.Reproduced locally against prod with the Desktop Chrome device: at 18.1.0 the rendered set lacks
87%atscrollLeft: 0and contains it after scrolling the master holder. The formatting itself is correct at every major.Fix (spec only): sweep
.ht_master .wtHolderacross its fullscrollWidth, accumulate the rendered cell text along the way, and assert over that union insideexpect.poll, so a slower re-render costs a retry instead of a false failure. Putting a fixedwidthback in the starter is not an option:pipeline/starter-grid-width.test.mjsforbids it and it would bring the clipped-grid defect from #307 back. Nothing inexamples/or in Handsontable itself needs to change.Types of changes
runner/) changeHow was this verified?
3 passed (9.7s). The sweep adds under 300ms per test.e2e/, so an ad hoctsc --noEmitwith thetsconfig.base.jsonoptions was run on the spec: no errors inside the changed block. The file's pre-existing errors (missing@types/node,noUncheckedIndexedAccesson the version parsing) are untouched.E2E_STARTER_MATRIXgate); after merge, aworkflow_dispatchof E2E — starter compatibility matrix confirms it ahead of the 01:00 UTC nightly.Checklist
runner/config/frameworks.json— n/a, no example changepnpm build(andpnpm dev) in the affected example/server-example locally — n/a, spec-only changeRelated issue(s):
Note
Low Risk
E2E test-only change in an opt-in matrix suite; no runtime or product behavior changes.
Overview
Fixes flaky example1 checks in the opt-in starter compatibility matrix (
E2E_STARTER_MATRIX) that were failing on Handsontable 17 and 18 with missing87%even though formatting is correct.Instead of collecting cell text from whatever columns are in the DOM at
scrollLeft: 0, the spec horizontally scrolls.ht_master .wtHolderacross its full width, unions rendered values (with a short post-scroll wait for Walkontable), and usesexpect.poll+toContainfor each expected formatted value fromexample1NumericCells. That avoids false negatives when the preview pane is narrower than the grid and column virtualization omits off-screen columns.Spec-only; no starter or Handsontable product changes.
Reviewed by Cursor Bugbot for commit f91d9cb. Bugbot is set up for automated code reviews on this repo. Configure here.