LearnNewsExamplesServices
Frontmatter
id9210
titleRegression: Unit Test Failures in Teleportation.spec.mjs after #9200
stateClosed
labels
bugaitestingregression
assigneestobiu
createdAtFeb 19, 2026, 1:52 PM
updatedAtFeb 19, 2026, 2:12 PM
githubUrlhttps://github.com/neomjs/neo/issues/9210
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 19, 2026, 2:12 PM

Regression: Unit Test Failures in Teleportation.spec.mjs after #9200

Closed v12.0.0 bugaitestingregression
tobiu
tobiu commented on Feb 19, 2026, 1:52 PM

Unit tests in test/playwright/unit/grid/Teleportation.spec.mjs are failing with TypeError: Cannot read properties of undefined (reading '0') when accessing cell.cn[0].

This started happening after the introduction of Neo.grid.column.Component optimization (Issue #9200).

Hypothesis: The optimization relies on record.version to short-circuit updates. If Teleportation.spec.mjs uses plain objects (where version is undefined), the optimization might trigger incorrectly (undefined === undefined), preventing components from rendering or updating when they should.

Objective:

  1. Investigate Teleportation.spec.mjs to understand how it mocks data.
  2. Fix Neo.grid.column.Component to handle cases where record.version is undefined (fallback to standard update).
  3. Ensure unit tests pass.
tobiu added the bug label on Feb 19, 2026, 1:52 PM
tobiu added the ai label on Feb 19, 2026, 1:52 PM
tobiu added the testing label on Feb 19, 2026, 1:52 PM
tobiu added the regression label on Feb 19, 2026, 1:52 PM
tobiu
tobiu Feb 19, 2026, 2:11 PM

Input from Gemini 3 Pro:

✦ Resolved regression in test/playwright/unit/grid/Teleportation.spec.mjs.

Root Cause: The test failure was unrelated to the new Record Versioning feature. It was a pre-existing fragility in the test code that was exposed by the environment change (possibly test sharding or load).

The test assumed that rowComponent.vdom.cn[1] always corresponded to the second logical column. However, Neo.grid.column.Component uses hideMode: 'visibility', which classifies it as a "Permanent Cell" in Neo.grid.Row's architecture. Permanent cells are appended after the fixed "Pooled Cells" array.

In the test scenario:

  • Column 0 (ID): Pooled (Index 0)
  • Column 1 (Component): Permanent (Appended at Index 20, assuming pool size 20)
  • cn[1] was actually a hidden placeholder cell from the pool, which naturally had no content, causing cell.cn[0] to throw "Cannot read properties of undefined".

Fix: Updated Teleportation.spec.mjs to robustly locate the component cell by inspecting the VDOM content (vdom.cn.find(...)) rather than relying on a hardcoded index. I also added detailed JSDoc to the test file to explain this "Full Pool Rendering" structure for future reference.

tobiu closed this issue on Feb 19, 2026, 2:12 PM
tobiu assigned to @tobiu on Feb 19, 2026, 2:12 PM