-
-
Notifications
You must be signed in to change notification settings - Fork 202
Fix Playwright Teleportation Tests for Fixed-DOM-Order Grid #9019
Copy link
Copy link
Closed
Labels
Description
Objective:
Update test/playwright/unit/grid/Teleportation.spec.mjs to align with the new "Fixed-DOM-Order" Row Pooling architecture. The current tests fail because they expect behaviors (DOM moves, direct VDOM structure access) that have been intentionally obsoleted by recent refactorings (#9012, #9017).
Issue 1: Expectation Mismatch (Zero Moves)
- Failure:
expect(moveNodes.length).toBe(3)received0. - Reason: The Fixed-DOM-Order strategy eliminates
moveNodeoperations for rows during scrolling. - Fix: Update the test to expect
0move deltas for rows. Verify text updates count and adjust if necessary.
Issue 2: VDOM Traversal Failure
- Failure:
TypeError: Cannot read properties of undefined (reading '1')when accessingfirstRenderedRow.cn[1]. - Reason:
GridBodynow containsNeo.grid.Rowreferences (placeholders) in itsvdom.cn, not the full VDOM tree of the rows. The test tries to access cellcn[1]directly from the Body's VDOM, which is no longer valid. - Fix:
- Resolve the
Neo.grid.Rowinstance from the Body's items (usinggetComponent). - Access the Row's own
vdomproperty to inspect cells and content.
- Resolve the
Plan:
- Modify
Teleportation.spec.mjsto assertmoveNodes.lengthis 0. - Refactor the DOM inspection logic to retrieve the Row component instance before inspecting its VDOM structure.
- Run the test to verify stability.
Related:
- Refactor Grid.Body to extend Component.Base and use internal Row Pool #9017 (Grid Body Refactor)
- Optimize Grid Row Pooling to eliminate moveNode deltas #9012 (Fixed-DOM-Order)
Reactions are currently unavailable